X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffunctional_tests.rs;h=714fe2f248a828a273f373eb7607285a2bac3953;hb=ffe9ae285d0c0399a11b6ee4ddb81c1588ab06f2;hp=cabbba8f3ae06914ffc209f4f1b56c02d5d09ed3;hpb=94e0ecec68d85ca1e10d08d6b35a9c9284c25ebb;p=rust-lightning diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index cabbba8f..714fe2f2 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -40,7 +40,7 @@ use crate::util::config::{UserConfig, MaxDustHTLCExposure}; use bitcoin::hash_types::BlockHash; use bitcoin::blockdata::script::{Builder, Script}; use bitcoin::blockdata::opcodes; -use bitcoin::blockdata::constants::genesis_block; +use bitcoin::blockdata::constants::ChainHash; use bitcoin::network::constants::Network; use bitcoin::{PackedLockTime, Sequence, Transaction, TxIn, TxOut, Witness}; use bitcoin::OutPoint as BitcoinOutPoint; @@ -5830,8 +5830,8 @@ fn bolt2_open_channel_sending_node_checks_part2() { assert!(node0_to_1_send_open_channel.to_self_delay==BREAKDOWN_TIMEOUT); // BOLT #2 spec: Sending node must ensure the chain_hash value identifies the chain it wishes to open the channel within. - let chain_hash=genesis_block(Network::Testnet).header.block_hash(); - assert_eq!(node0_to_1_send_open_channel.chain_hash,chain_hash); + let chain_hash = ChainHash::using_genesis_block(Network::Testnet); + assert_eq!(node0_to_1_send_open_channel.chain_hash, chain_hash); // BOLT #2 spec: Sending node must set funding_pubkey, revocation_basepoint, htlc_basepoint, payment_basepoint, and delayed_payment_basepoint to valid DER-encoded, compressed, secp256k1 pubkeys. assert!(PublicKey::from_slice(&node0_to_1_send_open_channel.funding_pubkey.serialize()).is_ok());