Exemplo n.º 1
0
 def test_from_tx_with_ctransaction_argument(self):
     tx = CTransaction()
     chainparams.set_to_preset('Peercoin')
     self.assertRaises(AttributeError, getattr, tx, 'Timestamp')
     tx2 = Transaction.from_tx(tx)
     self.assertIs(tx.__class__, CTransaction)
     self.assertEqual(tx2.Timestamp, 0)
Exemplo n.º 2
0
 def test_from_tx_with_transaction_argument(self):
     tx = Transaction()
     chainparams.set_to_preset('Peercoin')
     self.assertRaises(AttributeError, getattr, tx, 'Timestamp')
     tx2 = Transaction.from_tx(tx)
     self.assertIsNot(tx, tx2)
     self.assertEqual(tx2.Timestamp, 0)
Exemplo n.º 3
0
 def coerce_tx(v):
     return Transaction.from_tx(v)
Exemplo n.º 4
0
 def coerce_tx(v):
     return Transaction.from_tx(v)
Exemplo n.º 5
0
 def set_tx(self, tx):
     """Reset the model to reflect tx."""
     self.beginResetModel()
     self.tx = Transaction.from_tx(tx)
     self.endResetModel()
Exemplo n.º 6
0
 def set_tx(self, tx):
     """Reset the model to reflect tx."""
     self.beginResetModel()
     self.tx = Transaction.from_tx(tx)
     self.endResetModel()