@ -154,13 +154,11 @@ mod tests {
|
||||
let mut hasher = Hasher::default();
|
||||
hasher.hash(&buf[..size]);
|
||||
|
||||
use bs58;
|
||||
// golden needs to be updated if blob stuff changes....
|
||||
let golden = Hash::new(
|
||||
&bs58::decode("5Pz5KQyNht2nqkJhVd8F9zTFxzoDvbQSzaxQbtCPiyCo")
|
||||
.into_vec()
|
||||
.unwrap(),
|
||||
);
|
||||
let golden: Hash = "5Pz5KQyNht2nqkJhVd8F9zTFxzoDvbQSzaxQbtCPiyCo"
|
||||
.parse()
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(hasher.result(), golden);
|
||||
remove_file(out_path).unwrap();
|
||||
}
|
||||
|
@ -35,10 +35,7 @@ fn test_rpc_send_tx() {
|
||||
.send()
|
||||
.unwrap();
|
||||
let json: Value = serde_json::from_str(&response.text().unwrap()).unwrap();
|
||||
let blockhash_vec = bs58::decode(json["result"][0].as_str().unwrap())
|
||||
.into_vec()
|
||||
.unwrap();
|
||||
let blockhash = Hash::new(&blockhash_vec);
|
||||
let blockhash: Hash = json["result"][0].as_str().unwrap().parse().unwrap();
|
||||
|
||||
info!("blockhash: {:?}", blockhash);
|
||||
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash, 0);
|
||||
|
Reference in New Issue
Block a user