def test_change_tx_fields(self): tx = Transaction.deserialize(maza_raw_tx) chainparams.set_tx_fields(peercoin_fields) tx2 = Transaction.deserialize(ppc_raw_tx) self.assertNotEqual(tx.fields, tx2.fields)
def test_peercoin_fields(self): chainparams.set_tx_fields(peercoin_fields) tx = Transaction.deserialize(ppc_raw_tx) self.assertNotEqual(bitcoin_fields, tx.fields) self.assertIn(('Timestamp', b'<i', 4, 0), tx.fields) self.assertEqual(ppc_raw_tx, tx.serialize())
def test_clams_fields(self): chainparams.set_tx_fields(clams_fields) tx = Transaction.deserialize(clams_raw_tx) self.assertNotEqual(bitcoin_fields, tx.fields) self.assertIn(('ClamSpeech', 'bytes', None, b''), tx.fields) self.assertEqual(clams_raw_tx, tx.serialize())
def setUp(self): super(ChainparamsTest, self).setUp() chainparams.set_tx_fields(bitcoin_fields)