mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Expose pegin confirmation depth parameter via getsidechaininfo
This commit is contained in:
parent
89dd20a186
commit
25b2674fd6
2 changed files with 3 additions and 0 deletions
|
|
@ -2415,6 +2415,7 @@ UniValue getsidechaininfo(const JSONRPCRequest& request)
|
|||
" \"parent_chain_signblockscript_asm\": \"xxxx\", (string) If the parent chain has signed blocks, its signblockscript in ASM.\n"
|
||||
" \"parent_chain_signblockscript_hex\": \"xxxx\", (string) If the parent chain has signed blocks, its signblockscript in hex.\n"
|
||||
" \"parent_pegged_asset\": \"xxxx\", (boolean) If the parent chain has Confidential Assets, the asset id of the pegged asset in that chain.\n"
|
||||
" \"pegin_confirmation_depth\": x.xx (numeric) The number of mainchain confirmations required for a peg-in transaction to become valid.\n"
|
||||
" \"enforce_pak\": \"xxxx\", (boolean) If peg-out authorization is being enforced.\n"
|
||||
"}\n"
|
||||
},
|
||||
|
|
@ -2436,6 +2437,7 @@ UniValue getsidechaininfo(const JSONRPCRequest& request)
|
|||
obj.pushKV("parent_blockhash", parent_blockhash.GetHex());
|
||||
obj.pushKV("parent_chain_has_pow", consensus.ParentChainHasPow());
|
||||
obj.pushKV("enforce_pak", Params().GetEnforcePak());
|
||||
obj.pushKV("pegin_confirmation_depth", (uint64_t)consensus.pegin_min_depth);
|
||||
if (!consensus.ParentChainHasPow()) {
|
||||
obj.pushKV("parent_chain_signblockscript_asm", ScriptToAsmStr(consensus.parent_chain_signblockscript));
|
||||
obj.pushKV("parent_chain_signblockscript_hex", HexStr(consensus.parent_chain_signblockscript));
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ class FedPegTest(BitcoinTestFramework):
|
|||
assert_equal(sidechain.decodescript(addrs["claim_script"])["type"], "witness_v0_keyhash")
|
||||
txid1 = parent.sendtoaddress(addr, 24)
|
||||
# 10+2 confirms required to get into mempool and confirm
|
||||
assert_equal(sidechain.getsidechaininfo()["pegin_confirmation_depth"], 10)
|
||||
parent.generate(1)
|
||||
time.sleep(2)
|
||||
proof = parent.gettxoutproof([txid1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue