def test_did_sign_block_false_if_no_pending_sbcs(self): b = Delegate(socket_base='tcp://127.0.0.1', wallet=Wallet(), ctx=self.ctx, bootnodes=bootnodes, constitution=constitution) self.assertFalse(b.did_sign_block(None))
def test_did_sign_block_false_if_missing_any_merkle_roots(self): b = Delegate(socket_base='tcp://127.0.0.1', wallet=Wallet(), ctx=self.ctx, bootnodes=bootnodes, constitution=constitution) block = random_block() # Add one root but not the other b.pending_sbcs.add(block.subBlocks[0].merkleRoot) self.assertFalse(b.did_sign_block(block))