diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 7b84747a3fd8b..07a42b3f44c74 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1333,6 +1333,7 @@ RPCHelpMan getdeploymentinfo() RPCResult::Type::OBJ, "", "", { {RPCResult::Type::STR, "hash", "requested block hash (or tip)"}, {RPCResult::Type::NUM, "height", "requested block height (or tip)"}, + {RPCResult::Type::STR, "script_flags", "script verify flags for the block"}, {RPCResult::Type::OBJ_DYN, "deployments", "", { {RPCResult::Type::OBJ, "xxxx", "name of the deployment", RPCHelpForDeployment} }}, @@ -1359,6 +1360,7 @@ RPCHelpMan getdeploymentinfo() UniValue deploymentinfo(UniValue::VOBJ); deploymentinfo.pushKV("hash", blockindex->GetBlockHash().ToString()); deploymentinfo.pushKV("height", blockindex->nHeight); + deploymentinfo.pushKV("script_flags", FormatScriptFlags(GetBlockScriptFlags(*blockindex, chainman))); deploymentinfo.pushKV("deployments", DeploymentInfo(blockindex, chainman)); return deploymentinfo; }, diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 8eb9f3aeb1eda..5b3c7cf23d198 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -197,6 +197,7 @@ def check_signalling_deploymentinfo_result(self, gdi_result, height, blockhash, assert_equal(gdi_result, { "hash": blockhash, "height": height, + "script_flags": "CHECKLOCKTIMEVERIFY,CHECKSEQUENCEVERIFY,DERSIG,NULLDUMMY,P2SH,TAPROOT,WITNESS", "deployments": { 'bip34': {'type': 'buried', 'active': True, 'height': 2}, 'bip66': {'type': 'buried', 'active': True, 'height': 3},