def randomTxVerify(self, blocknum, txIndex=-1, profiling=False): [txHash, txIndex, siblings, txBlockHash] = randomMerkleProof(blocknum, txIndex) res = self.c.helperVerifyHash__(txHash, txIndex, siblings, txBlockHash, profiling=profiling) return res
def randomTxMerkleCheck(self, blocknum): [txHash, txIndex, siblings, txBlockHash, pybtctoolMerkle] = randomMerkleProof(blocknum, -1, True) merkle = self.c.computeMerkle(txHash, txIndex, siblings) merkle %= 2 ** 256 assert merkle == pybtctoolMerkle
def randomTxVerify(self, blocknum, txIndex=-1, profiling=False): [txHash, txIndex, siblings, txBlockHash] = randomMerkleProof(blocknum, txIndex) res = self.c.verifyTx(txHash, txIndex, siblings, txBlockHash, profiling=profiling) return res
def randomTxMerkleCheck(self, blocknum): [txHash, txIndex, siblings, txBlockHash, pybtctoolMerkle] = randomMerkleProof(blocknum, -1, True) merkle = self.c.computeMerkle(txHash, txIndex, siblings) assert merkle == pybtctoolMerkle