* merkle-tree: Add Xargo.toml (cherry picked from commita1d9b53cd7
) * merkle-tree: Get `Hash` et. al from program instead of sdk (cherry picked from commitddc0a16cec
) * merkle-tree: Use `matches` crate when targeting eBPF (cherry picked from commita44c32694f
) Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -4792,7 +4792,8 @@ version = "1.6.5"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"fast-math",
|
"fast-math",
|
||||||
"hex",
|
"hex",
|
||||||
"solana-sdk",
|
"matches",
|
||||||
|
"solana-program 1.6.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -10,9 +10,13 @@ documentation = "https://docs.rs/solana-merkle-tree"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk = { path = "../sdk", version = "=1.6.5" }
|
solana-program = { path = "../sdk/program", version = "=1.6.5" }
|
||||||
fast-math = "0.1"
|
fast-math = "0.1"
|
||||||
|
|
||||||
|
# This can go once the BPF toolchain target Rust 1.42.0+
|
||||||
|
[target.bpfel-unknown-unknown.dependencies]
|
||||||
|
matches = "0.1.8"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "0.4.2"
|
hex = "0.4.2"
|
||||||
|
|
||||||
|
2
merkle-tree/Xargo.toml
Normal file
2
merkle-tree/Xargo.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[target.bpfel-unknown-unknown.dependencies.std]
|
||||||
|
features = []
|
@ -1,3 +1,8 @@
|
|||||||
#![allow(clippy::integer_arithmetic)]
|
#![allow(clippy::integer_arithmetic)]
|
||||||
|
|
||||||
|
#[cfg(target_arch = "bpf")]
|
||||||
|
#[macro_use]
|
||||||
|
extern crate matches;
|
||||||
|
|
||||||
pub mod merkle_tree;
|
pub mod merkle_tree;
|
||||||
pub use merkle_tree::MerkleTree;
|
pub use merkle_tree::MerkleTree;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use solana_sdk::hash::{hashv, Hash};
|
use solana_program::hash::{hashv, Hash};
|
||||||
|
|
||||||
// We need to discern between leaf and intermediate nodes to prevent trivial second
|
// We need to discern between leaf and intermediate nodes to prevent trivial second
|
||||||
// pre-image attacks.
|
// pre-image attacks.
|
||||||
|
Reference in New Issue
Block a user