(self)
| 162 | |
| 163 | # Create 10 more anyone-can-spend utxo's for testing. |
| 164 | def make_utxos(self): |
| 165 | block = self.build_block_on_tip(self.nodes[0]) |
| 166 | self.segwit_node.send_and_ping(msg_no_witness_block(block)) |
| 167 | assert int(self.nodes[0].getbestblockhash(), 16) == block.sha256 |
| 168 | self.generate(self.wallet, COINBASE_MATURITY) |
| 169 | |
| 170 | total_value = block.vtx[0].vout[0].nValue.getAmount() |
| 171 | out_value = total_value // 10 |
| 172 | tx = CTransaction() |
| 173 | tx.vin.append(CTxIn(COutPoint(block.vtx[0].sha256, 0), b'')) |
| 174 | for _ in range(10): |
| 175 | tx.vout.append(CTxOut(out_value, CScript([OP_TRUE]))) |
| 176 | tx.rehash() |
| 177 | |
| 178 | block2 = self.build_block_on_tip(self.nodes[0]) |
| 179 | block2.vtx.append(tx) |
| 180 | block2.hashMerkleRoot = block2.calc_merkle_root() |
| 181 | block2.solve() |
| 182 | self.segwit_node.send_and_ping(msg_no_witness_block(block2)) |
| 183 | assert_equal(int(self.nodes[0].getbestblockhash(), 16), block2.sha256) |
| 184 | self.utxos.extend([[tx.sha256, i, out_value] for i in range(10)]) |
| 185 | |
| 186 | |
| 187 | # Test "sendcmpct" (between peers preferring the same version): |
no test coverage detected