Closed fanatid closed 8 years ago
Thanks for the feedback. Agree there's some redundancy.
IIRC the proofObj returned by getProof
previously didn't have the transactionHash (txHash), since the API before was getProof(transactions, transactionHash)
.
So getTxMerkle
doesn't use the txHash in proofObj.
Now getTxMerkle(transactionHash, proofObj)
is simpler than getTxMerkle(transactionHash, merkleSiblings, transactionIndex)
. So I think the redundancy is ok since it makes getTxMerkle
clearer.
Don't you mind if I shall create PR with changes? Also I would add semistandard as linter.
Sure, we can discuss PR with your changes. semistandard looks good. Thanks
For what purpose
getTxMerkle
require transaction hash as first argument? Transaction hash available in proof obj.