예제 #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)
예제 #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)
예제 #3
0
 def coerce_tx(v):
     return Transaction.from_tx(v)
예제 #4
0
 def coerce_tx(v):
     return Transaction.from_tx(v)
예제 #5
0
파일: tx.py 프로젝트: Christewart/hashmal
 def set_tx(self, tx):
     """Reset the model to reflect tx."""
     self.beginResetModel()
     self.tx = Transaction.from_tx(tx)
     self.endResetModel()
예제 #6
0
 def set_tx(self, tx):
     """Reset the model to reflect tx."""
     self.beginResetModel()
     self.tx = Transaction.from_tx(tx)
     self.endResetModel()