From 29310075f578643ef71990b80ad7dfc7d186329f Mon Sep 17 00:00:00 2001 From: captainbuckkets Date: Tue, 19 Dec 2023 06:53:52 -0700 Subject: [PATCH] various changes --- Cargo.lock | 64 ++++++++++---------- fuzz/fuzz_targets/transaction_builder.rs | 6 +- src/index.rs | 24 +++++--- src/object.rs | 24 ++++---- src/options.rs | 32 ++++++---- src/runes/rune.rs | 10 +-- src/subcommand/wallet/transaction_builder.rs | 2 +- src/test.rs | 12 ++-- test-bitcoincore-rpc/src/lib.rs | 4 +- test-bitcoincore-rpc/src/server.rs | 4 +- tests/json_api.rs | 2 +- tests/wallet/send.rs | 10 +-- 12 files changed, 102 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c12273c6c..ed6cb032fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,7 +263,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "bitcoin" version = "0.30.1" -source = "git+https://github.com/captainbuckkets/rust-peercoin?branch=0.30.x-patch#629608f414f62af24ca30fbc83c90cdc1fba2def" +source = "git+https://github.com/captainbuckkets/rust-peercoin?branch=0.30.x-patch#368e25b1fe8138e23cdd0964cef7b79d9abc7ec5" dependencies = [ "bech32 0.9.0", "bitcoin-private 0.1.0 (git+https://github.com/captainbuckkets/rust-peercoin?branch=0.30.x-patch)", @@ -484,7 +484,7 @@ checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" [[package]] name = "bitcoin-private" version = "0.1.0" -source = "git+https://github.com/captainbuckkets/rust-peercoin?branch=0.30.x-patch#629608f414f62af24ca30fbc83c90cdc1fba2def" +source = "git+https://github.com/captainbuckkets/rust-peercoin?branch=0.30.x-patch#368e25b1fe8138e23cdd0964cef7b79d9abc7ec5" [[package]] name = "bitcoin_hashes" @@ -505,7 +505,7 @@ dependencies = [ [[package]] name = "bitcoincore-rpc" version = "0.17.1" -source = "git+https://github.com/captainbuckkets/rust-bitcoincore-rpc?branch=master#9efdab36f8e94caf204fbcbc3bcc85dc9db93836" +source = "git+https://github.com/captainbuckkets/rust-bitcoincore-rpc?branch=master#3789265db51de28a5ac10833c1710dfa6705bb67" dependencies = [ "bitcoin-private 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitcoincore-rpc-json", @@ -518,7 +518,7 @@ dependencies = [ [[package]] name = "bitcoincore-rpc-json" version = "0.17.1" -source = "git+https://github.com/captainbuckkets/rust-bitcoincore-rpc?branch=master#9efdab36f8e94caf204fbcbc3bcc85dc9db93836" +source = "git+https://github.com/captainbuckkets/rust-bitcoincore-rpc?branch=master#3789265db51de28a5ac10833c1710dfa6705bb67" dependencies = [ "bitcoin", "bitcoin-private 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -574,7 +574,7 @@ dependencies = [ "new_mime_guess", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -720,7 +720,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -737,11 +737,10 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", "windows-sys 0.48.0", ] @@ -810,9 +809,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -821,22 +820,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if 1.0.0", ] @@ -906,7 +904,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -928,7 +926,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1058,7 +1056,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1280,7 +1278,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1777,9 +1775,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libredox" @@ -2088,7 +2086,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2236,7 +2234,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2591,7 +2589,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.39", + "syn 2.0.41", "walkdir", ] @@ -2830,7 +2828,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -3000,9 +2998,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -3118,7 +3116,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -3190,7 +3188,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -3496,7 +3494,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-shared", ] @@ -3530,7 +3528,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/fuzz/fuzz_targets/transaction_builder.rs b/fuzz/fuzz_targets/transaction_builder.rs index e91f5af2d3..b12cf73376 100644 --- a/fuzz/fuzz_targets/transaction_builder.rs +++ b/fuzz/fuzz_targets/transaction_builder.rs @@ -46,17 +46,17 @@ fuzz_target!(|input: Input| { ); } - let recipient = "bc1pdqrcrxa8vx6gy75mfdfj84puhxffh4fq46h3gkp6jxdd0vjcsdyspfxcv6" + let recipient = "pc1pdqrcrxa8vx6gy75mfdfj84puhxffh4fq46h3gkp6jxdd0vjcsdyspfxcv6" .parse::>() .unwrap() .assume_checked(); let change = [ - "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" + "pc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" .parse::>() .unwrap() .assume_checked(), - "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" + "pc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" .parse::>() .unwrap() .assume_checked(), diff --git a/src/index.rs b/src/index.rs index d76657d475..f993b9dd69 100644 --- a/src/index.rs +++ b/src/index.rs @@ -388,6 +388,8 @@ impl Index { }), ); + println!("utxos: {:?}", utxos); + let locked_utxos: BTreeSet = self.get_locked_outputs(wallet)?; // Print locked_utxos for outpoint in locked_utxos { @@ -403,16 +405,20 @@ impl Index { ); } + println!("locked utxos: {:?}", utxos); - let rtx = self.database.begin_read()?; - let outpoint_to_value = rtx.open_table(OUTPOINT_TO_VALUE)?; - for outpoint in utxos.keys() { - if outpoint_to_value.get(&outpoint.store())?.is_none() { - return Err(anyhow!( - "output in Peercoin Core wallet but not in ord index: {outpoint}" - )); - } - } + // let rtx = self.database.begin_read()?; + // let outpoint_to_value = rtx.open_table(OUTPOINT_TO_VALUE)?; + + // println!("outpoint_to_value: {:?}", outpoint_to_value); + + // for outpoint in utxos.keys() { + // if outpoint_to_value.get(&outpoint.store())?.is_none() { + // return Err(anyhow!( + // "output in Peercoin Core wallet but not in ord index: {outpoint}" + // )); + // } + // } Ok(utxos) } diff --git a/src/object.rs b/src/object.rs index 2c0c838e96..4caa30152d 100644 --- a/src/object.rs +++ b/src/object.rs @@ -117,49 +117,49 @@ mod tests { ]), ); case( - "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", + "pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", Object::Address( - "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" + "pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" .parse() .unwrap(), ), ); case( - "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4", + "PC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4", Object::Address( - "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4" + "PC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4" .parse() .unwrap(), ), ); case( - "tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy", + "tp1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy", Object::Address( - "tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy" + "tp1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy" .parse() .unwrap(), ), ); case( - "TB1QQQQQP399ET2XYGDJ5XREQHJJVCMZHXW4AYWXECJDZEW6HYLGVSESRXH6HY", + "TP1QQQQQP399ET2XYGDJ5XREQHJJVCMZHXW4AYWXECJDZEW6HYLGVSESRXH6HY", Object::Address( - "TB1QQQQQP399ET2XYGDJ5XREQHJJVCMZHXW4AYWXECJDZEW6HYLGVSESRXH6HY" + "TP1QQQQQP399ET2XYGDJ5XREQHJJVCMZHXW4AYWXECJDZEW6HYLGVSESRXH6HY" .parse() .unwrap(), ), ); case( - "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw", + "pcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw", Object::Address( - "bcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw" + "pcrt1qs758ursh4q9z627kt3pp5yysm78ddny6txaqgw" .parse() .unwrap(), ), ); case( - "BCRT1QS758URSH4Q9Z627KT3PP5YYSM78DDNY6TXAQGW", + "PCRT1QS758URSH4Q9Z627KT3PP5YYSM78DDNY6TXAQGW", Object::Address( - "BCRT1QS758URSH4Q9Z627KT3PP5YYSM78DDNY6TXAQGW" + "PCRT1QS758URSH4Q9Z627KT3PP5YYSM78DDNY6TXAQGW" .parse() .unwrap(), ), diff --git a/src/options.rs b/src/options.rs index e60af4dec0..5655137712 100644 --- a/src/options.rs +++ b/src/options.rs @@ -249,12 +249,13 @@ impl Options { let client = self.bitcoin_rpc_client()?; // const MIN_VERSION: usize = 240000; + // Using the protocol version here const MIN_VERSION: usize = 70017; let bitcoin_version = client.version()?; if bitcoin_version < MIN_VERSION { bail!( - "Bitcoin Core {} or newer required, current version is {}", + "Peercoin Core {} or newer required, current version is {}", Self::format_bitcoin_core_version(MIN_VERSION), Self::format_bitcoin_core_version(bitcoin_version), ); @@ -266,21 +267,26 @@ impl Options { } // Remove for now - // let descriptors = client.list_descriptors(None)?.descriptors; + let descriptors = client.list_descriptors(None)?.descriptors; + println!("descriptors: {:?}", descriptors); - // let tr = descriptors - // .iter() - // .filter(|descriptor| descriptor.desc.starts_with("tr(")) - // .count(); + let tr = descriptors + .iter() + .filter(|descriptor| descriptor.desc.starts_with("tr(")) + .count(); - // let rawtr = descriptors - // .iter() - // .filter(|descriptor| descriptor.desc.starts_with("rawtr(")) - // .count(); + println!("tr: {}", tr); - // if tr != 2 || descriptors.len() != 2 + rawtr { - // bail!("wallet \"{}\" contains unexpected output descriptors, and does not appear to be an `ord` wallet, create a new wallet with `ord wallet create`", self.wallet); - // } + let rawtr = descriptors + .iter() + .filter(|descriptor| descriptor.desc.starts_with("rawtr(")) + .count(); + + println!("rawtr: {}", rawtr); + + if tr != 2 || descriptors.len() != 2 + rawtr { + bail!("wallet \"{}\" contains unexpected output descriptors, and does not appear to be an `ord` wallet, create a new wallet with `ord wallet create`", self.wallet); + } } Ok(client) diff --git a/src/runes/rune.rs b/src/runes/rune.rs index 4165070b8b..3396d5a30f 100644 --- a/src/runes/rune.rs +++ b/src/runes/rune.rs @@ -43,7 +43,7 @@ impl Display for Rune { fn fmt(&self, f: &mut Formatter) -> fmt::Result { let mut n = self.0; if n == u128::max_value() { - return write!(f, "BCGDENLQRQWDSLRUGSNLBTMFIJAV"); + return write!(f, "PCGDENLQRQWDSLRUGSNLBTMFIJAV"); } n += 1; @@ -130,14 +130,14 @@ mod tests { case(27, "AB"); case(51, "AZ"); case(52, "BA"); - case(u128::max_value() - 2, "BCGDENLQRQWDSLRUGSNLBTMFIJAT"); - case(u128::max_value() - 1, "BCGDENLQRQWDSLRUGSNLBTMFIJAU"); - case(u128::max_value(), "BCGDENLQRQWDSLRUGSNLBTMFIJAV"); + case(u128::max_value() - 2, "PCGDENLQRQWDSLRUGSNLBTMFIJAT"); + case(u128::max_value() - 1, "PCGDENLQRQWDSLRUGSNLBTMFIJAU"); + case(u128::max_value(), "PCGDENLQRQWDSLRUGSNLBTMFIJAV"); } #[test] fn from_str_out_of_range() { - "BCGDENLQRQWDSLRUGSNLBTMFIJAW".parse::().unwrap_err(); + "PCGDENLQRQWDSLRUGSNLBTMFIJAW".parse::().unwrap_err(); } #[test] diff --git a/src/subcommand/wallet/transaction_builder.rs b/src/subcommand/wallet/transaction_builder.rs index 94ef9cac04..b3f6749d5f 100644 --- a/src/subcommand/wallet/transaction_builder.rs +++ b/src/subcommand/wallet/transaction_builder.rs @@ -1620,7 +1620,7 @@ mod tests { let after = TransactionBuilder::estimate_vbytes_with( 0, vec![ - "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" + "pc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" .parse::>() .unwrap() .assume_checked(), diff --git a/src/test.rs b/src/test.rs index a306c19bba..3a9a579d94 100644 --- a/src/test.rs +++ b/src/test.rs @@ -69,14 +69,14 @@ pub(crate) fn satpoint(n: u64, offset: u64) -> SatPoint { } pub(crate) fn address() -> Address { - "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" + "pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" .parse::>() .unwrap() .assume_checked() } pub(crate) fn recipient() -> Address { - "tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" + "tp1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" .parse::>() .unwrap() .assume_checked() @@ -84,10 +84,10 @@ pub(crate) fn recipient() -> Address { pub(crate) fn change(n: u64) -> Address { match n { - 0 => "tb1qjsv26lap3ffssj6hfy8mzn0lg5vte6a42j75ww", - 1 => "tb1qakxxzv9n7706kc3xdcycrtfv8cqv62hnwexc0l", - 2 => "tb1qxz9yk0td0yye009gt6ayn7jthz5p07a75luryg", - 3 => "tb1qe62s57n77pfhlw2vtqlhm87dwj75l6fguavjjq", + 0 => "tp1qjsv26lap3ffssj6hfy8mzn0lg5vte6a42j75ww", + 1 => "tp1qakxxzv9n7706kc3xdcycrtfv8cqv62hnwexc0l", + 2 => "tp1qxz9yk0td0yye009gt6ayn7jthz5p07a75luryg", + 3 => "tp1qe62s57n77pfhlw2vtqlhm87dwj75l6fguavjjq", _ => panic!(), } .parse::>() diff --git a/test-bitcoincore-rpc/src/lib.rs b/test-bitcoincore-rpc/src/lib.rs index 0e94dec23c..5d800266af 100644 --- a/test-bitcoincore-rpc/src/lib.rs +++ b/test-bitcoincore-rpc/src/lib.rs @@ -17,11 +17,11 @@ use { Wtxid, }, bitcoincore_rpc::json::{ - Bip125Replaceable, CreateRawTransactionInput, EstimateMode, GetBalancesResult, + Bip125Replaceable, CreateRawTransactionInput, Descriptor, EstimateMode, GetBalancesResult, GetBalancesResultEntry, GetBlockHeaderResult, GetBlockchainInfoResult, GetDescriptorInfoResult, GetNetworkInfoResult, GetRawTransactionResult, GetTransactionResult, GetTransactionResultDetail, GetTransactionResultDetailCategory, GetWalletInfoResult, - ImportDescriptors, ImportMultiResult, ListTransactionResult, + ImportDescriptors, ImportMultiResult, ListTransactionResult, ListDescriptorsResult, ListUnspentResultEntry, LoadWalletResult, SignRawTransactionInput, SignRawTransactionResult, Timestamp, WalletTxInfo, }, diff --git a/test-bitcoincore-rpc/src/server.rs b/test-bitcoincore-rpc/src/server.rs index 9efd06d829..3d57cf5c07 100644 --- a/test-bitcoincore-rpc/src/server.rs +++ b/test-bitcoincore-rpc/src/server.rs @@ -418,7 +418,7 @@ impl Api for Server { _include_watchonly: Option, ) -> Result { // Print the ixid to the console - println!("get_transaction: {}", txid); + // println!("get_transaction: {}", txid); match self.state.lock().unwrap().transactions.get(&txid) { Some(tx) => Ok( serde_json::to_value(GetTransactionResult { @@ -432,7 +432,7 @@ impl Api for Server { blockheight: None, blocktime: None, wallet_conflicts: Vec::new(), - bip125_replaceable: Bip125Replaceable::Unknown, + // bip125_replaceable: Bip125Replaceable::Unknown, }, amount: SignedAmount::from_sat(0), fee: None, diff --git a/tests/json_api.rs b/tests/json_api.rs index ab3dfb8e8e..856851896b 100644 --- a/tests/json_api.rs +++ b/tests/json_api.rs @@ -141,7 +141,7 @@ fn get_inscription() { let mut inscription_json: InscriptionJson = serde_json::from_str(&response.text().unwrap()).unwrap(); - assert_regex_match!(inscription_json.address.unwrap(), r"bc1p.*"); + assert_regex_match!(inscription_json.address.unwrap(), r"pc1p.*"); inscription_json.address = None; pretty_assert_eq!( diff --git a/tests/wallet/send.rs b/tests/wallet/send.rs index da3e106030..5c29d6dfa7 100644 --- a/tests/wallet/send.rs +++ b/tests/wallet/send.rs @@ -315,7 +315,7 @@ fn inscriptions_cannot_be_sent_by_satpoint() { rpc_server.mine_blocks(1); CommandBuilder::new(format!( - "wallet send --fee-rate 1 bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 {reveal}:0:0" + "wallet send --fee-rate 1 pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 {reveal}:0:0" )) .rpc_server(&rpc_server) .expected_stderr("error: inscriptions must be sent by inscription ID\n") @@ -331,7 +331,7 @@ fn send_btc_with_fee_rate() { rpc_server.mine_blocks(1); CommandBuilder::new( - "wallet send --fee-rate 13.3 bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 1btc", + "wallet send --fee-rate 13.3 pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 1btc", ) .rpc_server(&rpc_server) .run_and_deserialize_output::(); @@ -356,7 +356,7 @@ fn send_btc_with_fee_rate() { rpc_server.sent(), &[Sent { amount: 1.0, - address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" + address: "pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" .parse::>() .unwrap() .assume_checked(), @@ -374,7 +374,7 @@ fn send_btc_locks_inscriptions() { let (_, reveal) = inscribe(&rpc_server); - CommandBuilder::new("wallet send --fee-rate 1 bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 1btc") + CommandBuilder::new("wallet send --fee-rate 1 pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 1btc") .rpc_server(&rpc_server) .run_and_deserialize_output::(); @@ -382,7 +382,7 @@ fn send_btc_locks_inscriptions() { rpc_server.sent(), &[Sent { amount: 1.0, - address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" + address: "pc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" .parse::>() .unwrap() .assume_checked(),