-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
RPCChanges something with our JSON-RPC interfaceChanges something with our JSON-RPC interfacebugSomething isn't workingSomething isn't working
Description
Describe the bug
While writing tests for gettxout
rpc, found that our implementation isn't compliant with core, both in output and arguments.
The output have non-compliant output and our implementation do not receive a third argument (include_mempool
).
Steps to Reproduce
Do all in regtest:
- start 2 nodes, one floresta and a miner (can be bitcoind or utreexod);
- add an receiving address (in tests I used
bcrt1q4gfcga7jfjmm02zpvrh4ttc5k7lmnq2re52z2y
) to a config.toml file for floresta, so we can track it; - mine some blocks to this address;
- connect the nodes;
- wait for nodes to be sync;
- get a transaction in to check (could be any block);
- call
gettxout
in floresta; - call
gettxout
in bitcoin-core.
Expected behavior
It was expected that Floresta show an output like core:
{
'bestblock': '373113eda583c35a2e5c15b283fca0061f814b1dbf6353d2efb7fd262c764f8b',
'confirmations': 1,
'value': 50.0,
'scriptPubKey': {
'asm': '0 aa138477d24cb7b7a84160ef55af14b7bfb98143',
'desc': 'addr(bcrt1q4gfcga7jfjmm02zpvrh4ttc5k7lmnq2re52z2y)#x24ul7uf',
'hex': '0014aa138477d24cb7b7a84160ef55af14b7bfb98143',
'address': 'bcrt1q4gfcga7jfjmm02zpvrh4ttc5k7lmnq2re52z2y',
'type': 'witness_v0_keyhash'
},
'coinbase': True
}
But it showed this:
{
'script_pubkey': '0014aa138477d24cb7b7a84160ef55af14b7bfb98143',
'value': 5000000000
}
Our script_pubkey
isn't Camelcase, as well it is a string, not another object (our matches only the scriptPubKey["hex"] field
.
Build environment
version v0.8.0-20-geafa9d1 compiled for aarch64-macos- with rustc 1.90.0-nightly (ba7e63b63 2025-07-29)
Additional context
Follow-up of #453.
Metadata
Metadata
Assignees
Labels
RPCChanges something with our JSON-RPC interfaceChanges something with our JSON-RPC interfacebugSomething isn't workingSomething isn't working