diff --git a/verify/src/lib.rs b/verify/src/lib.rs index 2eccb098..63e20f45 100644 --- a/verify/src/lib.rs +++ b/verify/src/lib.rs @@ -183,8 +183,8 @@ pub fn grep_for_re_export(path: &Path, s: &str) -> Result { .with_context(|| format!("Failed to grep for string in {}", path.display()))?; let reader = io::BufReader::new(file); - let s = format!("{}[,}};]", &s); - let re = Regex::new(&s)?; + let pattern = format!(r"\b{}[,}};]", regex::escape(s)); + let re = Regex::new(&pattern)?; for line in reader.lines() { let line = line?; diff --git a/verify/src/main.rs b/verify/src/main.rs index a14103a7..c5badf07 100644 --- a/verify/src/main.rs +++ b/verify/src/main.rs @@ -53,37 +53,48 @@ fn main() -> Result<()> { } fn verify_all_versions(test_output: Option<&String>, quiet: bool) -> Result<()> { + let mut any_failed = false; for version in VERSIONS { println!("\nVerifying for Bitcoin Core version {} ...", version); - verify_version(version, test_output, quiet)?; + if verify_version(version, test_output, quiet).is_err() { + any_failed = true; + } + } + if any_failed { + return Err(anyhow::anyhow!("verification failed for one or more versions")) } Ok(()) } fn verify_version(version: Version, test_output: Option<&String>, quiet: bool) -> Result<()> { + let mut failures = 0; + let s = format!("{}::METHOD data", version); let msg = format!("Checking that the {} list is correct", s); check(&msg, quiet); - let correct = verify_correct_methods(version, method::all_methods(version), &s)?; - close(correct, quiet); - if !correct { - process::exit(1); + match verify_correct_methods(version, method::all_methods(version), &s) { + Ok(()) => close(true, quiet), + Err(e) => { if !quiet { eprintln!("{}", e); } close(false, quiet); failures += 1; } } let s = "rustdoc version specific rustdocs"; let msg = format!("Checking that the {} list is correct", s); check(&msg, quiet); - let correct = verify_correct_methods(version, versioned::all_methods(version)?, s)?; - close(correct, quiet); - if !correct { - process::exit(1); + match verify_correct_methods(version, versioned::all_methods(version)?, s) { + Ok(()) => close(true, quiet), + Err(e) => { if !quiet { eprintln!("{}", e); } close(false, quiet); failures += 1; } } let msg = "Checking that the status claimed in the version specific rustdocs is correct"; check(msg, quiet); - verify_status(version, test_output)?; - close(correct, quiet); + match verify_status(version, test_output) { + Ok(()) => close(true, quiet), + Err(e) => { if !quiet { eprintln!("{}", e); } close(false, quiet); failures += 1; } + } + if failures > 0 { + return Err(anyhow::anyhow!("verification failed ({} check(s) failed)", failures)); + } Ok(()) } @@ -94,40 +105,53 @@ fn check(msg: &str, quiet: bool) { } fn close(correct: bool, quiet: bool) { - if correct && !quiet { + if quiet { return; } + if correct { println!("Correct \u{2713} \n"); + } else { + println!("\u{001b}[31mIncorrect \u{2717}\u{001b}[0m \n"); } } /// Verifies that the correct set of methods are documented. -fn verify_correct_methods(version: Version, methods: Vec, msg: &str) -> Result { +fn verify_correct_methods(version: Version, methods: Vec, msg: &str) -> Result<()> { let ssot = ssot::all_methods(version)?; let want = ssot.iter().map(|s| s.as_str()).collect::>(); let got = methods.iter().map(|s| s.as_str()).collect::>(); - Ok(verify::correct_methods(&got, &want, msg)) + if !verify::correct_methods(&got, &want, msg) { + return Err(anyhow::anyhow!("incorrect {}", msg)); + } + Ok(()) } /// Verifies that the status we claim is correct. fn verify_status(version: Version, test_output: Option<&String>) -> Result<()> { let methods = versioned::methods_and_status(version)?; + let mut failures = 0; for method in methods { match method.status { Status::Done => { - check_types_exist_if_required(version, &method.name)?; + if check_types_exist_if_required(version, &method.name).is_err() { + failures += 1; + } if let Some(test_output) = test_output { - if !check_integration_test_crate::test_exists(version, &method.name, test_output)? { + if check_integration_test_crate::test_exists(version, &method.name, test_output).is_err() { eprintln!("missing integration test: {}", method.name); + failures += 1; } } } Status::Untested => { - check_types_exist_if_required(version, &method.name)?; + if check_types_exist_if_required(version, &method.name).is_err() { + failures += 1; + } // Make sure we didn't forget to mark as tested after implementing integration test. if let Some(test_output) = test_output { - if check_integration_test_crate::test_exists(version, &method.name, test_output)? { + if check_integration_test_crate::test_exists(version, &method.name, test_output).is_ok() { eprintln!("found integration test for untested method: {}", method.name); + failures += 1; } } } @@ -137,15 +161,20 @@ fn verify_status(version: Version, test_output: Option<&String>) -> Result<()> { if versioned::type_exists(version, &method.name)? && !versioned::requires_type(version, &method.name)? { eprintln!("return type found but method is omitted or TODO: {}", output_method(out)); + failures += 1; } if model::type_exists(version, &method.name)? && !model::requires_type(version, &method.name)? { eprintln!("model type found but method is omitted or TODO: {}", output_method(out)); + failures += 1; } } } } + if failures > 0 { + return Err(anyhow::anyhow!("status verification failed ({} issue(s))", failures)); + } Ok(()) } @@ -154,12 +183,15 @@ fn check_types_exist_if_required(version: Version, method_name: &str) -> Result< if versioned::requires_type(version, method_name)? && !versioned::type_exists(version, method_name)? { eprintln!("missing return type: {}", output_method(out)); + return Err(anyhow::anyhow!("missing return type")); } if model::requires_type(version, method_name)? && !model::type_exists(version, method_name)? { eprintln!("missing model type: {}", output_method(out)); + return Err(anyhow::anyhow!("missing model type")); } if model::type_exists(version, method_name)? && !model::requires_type(version, method_name)? { eprintln!("found model type when none expected: {}", output_method(out)); + return Err(anyhow::anyhow!("unexpected model type")); } Ok(()) } diff --git a/verify/src/method/v21.rs b/verify/src/method/v21.rs index 463e127d..270ede7b 100644 --- a/verify/src/method/v21.rs +++ b/verify/src/method/v21.rs @@ -161,7 +161,7 @@ pub const METHODS: &[Method] = &[ "sign_raw_transaction_with_wallet", ), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v22.rs b/verify/src/method/v22.rs index bf002e23..54b9c353 100644 --- a/verify/src/method/v22.rs +++ b/verify/src/method/v22.rs @@ -164,7 +164,7 @@ pub const METHODS: &[Method] = &[ "sign_raw_transaction_with_wallet", ), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v23.rs b/verify/src/method/v23.rs index 6b7c735c..94ec6f7b 100644 --- a/verify/src/method/v23.rs +++ b/verify/src/method/v23.rs @@ -12,7 +12,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -84,7 +84,6 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -132,7 +131,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listdescriptors", "ListDescriptors", "list_descriptors"), Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -149,7 +148,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendmany", "SendMany", "send_many"), Method::new_modelled("sendtoaddress", "SendToAddress", "send_to_address"), @@ -164,7 +163,7 @@ pub const METHODS: &[Method] = &[ "sign_raw_transaction_with_wallet", ), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v24.rs b/verify/src/method/v24.rs index 0282fa89..96b94382 100644 --- a/verify/src/method/v24.rs +++ b/verify/src/method/v24.rs @@ -12,7 +12,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -85,7 +85,6 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -134,7 +133,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -151,7 +150,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -168,7 +167,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs index 19dc5e3d..47668bb4 100644 --- a/verify/src/method/v25.rs +++ b/verify/src/method/v25.rs @@ -12,7 +12,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -36,7 +36,7 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("preciousblock", "precious_block"), Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_no_model("savemempool", "SaveMempool", "save_mempool"), - Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_no_model("verifychain", "VerifyChain", "verify_chain"), Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), @@ -86,7 +86,6 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("signrawtransactionwithkey", "sign_raw_transaction_with_key"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -135,7 +134,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -152,7 +151,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -169,7 +168,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v26.rs b/verify/src/method/v26.rs index 4b09b275..27e79639 100644 --- a/verify/src/method/v26.rs +++ b/verify/src/method/v26.rs @@ -13,7 +13,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -40,7 +40,7 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("preciousblock", "precious_block"), Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_no_model("savemempool", "SaveMempool", "save_mempool"), - Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_no_model("verifychain", "VerifyChain", "verify_chain"), Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), @@ -94,7 +94,6 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("submitpackage", "SubmitPackage", "submit_package"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -143,7 +142,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -160,7 +159,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -177,7 +176,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v27.rs b/verify/src/method/v27.rs index f1fd7737..7747fc94 100644 --- a/verify/src/method/v27.rs +++ b/verify/src/method/v27.rs @@ -13,7 +13,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -40,7 +40,7 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("preciousblock", "precious_block"), Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_no_model("savemempool", "SaveMempool", "save_mempool"), - Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_no_model("verifychain", "VerifyChain", "verify_chain"), Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), @@ -96,7 +96,6 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("submitpackage", "SubmitPackage", "submit_package"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -145,7 +144,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -162,7 +161,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -179,7 +178,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v28.rs b/verify/src/method/v28.rs index 8782d908..600f7739 100644 --- a/verify/src/method/v28.rs +++ b/verify/src/method/v28.rs @@ -1,10 +1,10 @@ // SPDX-License-Identifier: CC0-1.0 -//! JSON RPC methods provided by Bitcoin Core v26. +//! JSON RPC methods provided by Bitcoin Core v28. use super::Method; -/// Data for the JSON RPC methods provided by Bitcoin Core v26. +/// Data for the JSON RPC methods provided by Bitcoin Core v28. pub const METHODS: &[Method] = &[ // blockchain Method::new_modelled("dumptxoutset", "DumpTxOutSet", "dump_tx_out_set"), @@ -13,7 +13,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -40,7 +40,7 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("preciousblock", "precious_block"), Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_no_model("savemempool", "SaveMempool", "save_mempool"), - Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_no_model("verifychain", "VerifyChain", "verify_chain"), Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), @@ -96,7 +96,6 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("submitpackage", "SubmitPackage", "submit_package"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -147,7 +146,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -164,7 +163,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -181,7 +180,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt", diff --git a/verify/src/method/v29.rs b/verify/src/method/v29.rs index 497362cc..f1e1db95 100644 --- a/verify/src/method/v29.rs +++ b/verify/src/method/v29.rs @@ -13,7 +13,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getblockchaininfo", "GetBlockchainInfo", "get_blockchain_info"), Method::new_modelled("getblockcount", "GetBlockCount", "get_block_count"), Method::new_modelled("getblockfilter", "GetBlockFilter", "get_block_filter"), - Method::new_modelled("getblockfrompeer", "GetBlockFromPeer", "get_block_from_peer"), + Method::new_nothing("getblockfrompeer", "get_block_from_peer"), Method::new_modelled("getblockhash", "GetBlockHash", "get_block_hash"), Method::new_modelled("getblockheader", "GetBlockHeader", "get_block_header"), Method::new_modelled("getblockstats", "GetBlockStats", "get_block_stats"), @@ -41,7 +41,7 @@ pub const METHODS: &[Method] = &[ Method::new_nothing("preciousblock", "precious_block"), Method::new_no_model("pruneblockchain", "PruneBlockchain", "prune_blockchain"), Method::new_no_model("savemempool", "SaveMempool", "save_mempool"), - Method::new_modelled("scanblocks", "ScanBlocks", "scan_blocks"), + Method::new_modelled("scanblocks", "ScanBlocksStart", "scan_blocks"), Method::new_modelled("scantxoutset", "ScanTxOutSet", "scan_tx_out_set"), Method::new_no_model("verifychain", "VerifyChain", "verify_chain"), Method::new_modelled("verifytxoutproof", "VerifyTxOutProof", "verify_tx_out_proof"), @@ -97,7 +97,6 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("submitpackage", "SubmitPackage", "submit_package"), Method::new_nothing("testmempoolaccept", "test_mempool_accept"), Method::new_modelled("utxoupdatepsbt", "UtxoUpdatePsbt", "utxo_update_psbt"), - Method::new_modelled("enumeratesigners", "EnumerateSigners", "enumerate_signers"), Method::new_modelled("createmultisig", "CreateMultisig", "create_multisig"), Method::new_modelled("deriveaddresses", "DeriveAddresses", "derive_addresses"), Method::new_nothing("estimatesmartfee", "estimate_smart_fee"), @@ -148,7 +147,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("listlabels", "ListLabels", "list_labels"), Method::new_modelled("listlockunspent", "ListLockUnspent", "list_lock_unspent"), Method::new_no_model("migratewallet", "MigrateWallet", "migrate_wallet"), - Method::new_modelled("newkeypool", "NewKeyPool", "new_key_pool"), + Method::new_nothing("newkeypool", "new_key_pool"), Method::new_modelled("psbtbumpfee", "PsbtBumpFee", "psbt_bump_fee"), Method::new_modelled( "listreceivedbyaddress", @@ -165,7 +164,7 @@ pub const METHODS: &[Method] = &[ Method::new_no_model("lockunspent", "LockUnspent", "lock_unspent"), Method::new_nothing("removeprunedfunds", "remove_pruned_funds"), Method::new_modelled("rescanblockchain", "RescanBlockchain", "rescan_blockchain"), - Method::new_modelled("restorewallet", "RestoreWallet", "restore_wallet"), + Method::new_no_model("restorewallet", "RestoreWallet", "restore_wallet"), Method::new_modelled("send", "Send", "send"), Method::new_modelled("sendall", "SendAll", "send_all"), Method::new_modelled("sendmany", "SendMany", "send_many"), @@ -182,7 +181,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("simulaterawtransaction", "SimulateRawTransaction", "simulate_raw_transaction"), Method::new_nothing("unloadwallet", "unload_wallet"), - Method::new_no_model("upgradewallet", "UpgradeWalled", "upgrade_wallet"), + Method::new_no_model("upgradewallet", "UpgradeWallet", "upgrade_wallet"), Method::new_modelled( "walletcreatefundedpsbt", "WalletCreateFundedPsbt",