Added gettxoutproof RPC#160
Conversation
| } | ||
| if (block == null && chainedHeader.BlockDataAvailability == BlockDataAvailabilityState.BlockAvailable) // Only get the block once. | ||
| { | ||
| block = this.blockStore.GetBlock(chainedHeader.HashBlock); |
There was a problem hiding this comment.
aren't you missing a break; here?
Do we assume all trx are of the same block?
There was a problem hiding this comment.
Ideally to fetch blocks we should use the ConsensusManager that will fetch from memory first (and it can even download a block if its not available.
There was a problem hiding this comment.
aren't you missing a
break;here?
Do we assume all trx are of the same block?
No, we need to check all transactions.
There was a problem hiding this comment.
Ideally to fetch blocks we should use the ConsensusManager that will fetch from memory first (and it can even download a block if its not available.
Done. Good to know, thank you.
There was a problem hiding this comment.
No, we need to check all transactions.
but once you find the block the param is not null and wont be fetched anymore, unless you want to find all the headers and check they are part of the same block
There was a problem hiding this comment.
No, we need to check all transactions.
but once you find the block the param is not null and wont be fetched anymore, unless you want to find all the headers and check they are part of the same block
That is correct, I want to verify that they are all in the same block, otherwise, it's not valid proof.
Added
gettxoutproofRPC (0.20.0 RPC).Checks if transactions are within block. Returns proof of transaction inclusion (raw MerkleBlock).