Implement novacoin mining support
[stratum-mining.git] / lib / coinbasetx.py
index 8953106..d26f93c 100644 (file)
@@ -12,7 +12,7 @@ class CoinbaseTransaction(halfnode.CTransaction):
     extranonce_placeholder = struct.pack(extranonce_type, int('f000000ff111111f', 16))
     extranonce_size = struct.calcsize(extranonce_type)
 
-    def __init__(self, timestamper, coinbaser, value, flags, height, data):
+    def __init__(self, timestamper, coinbaser, value, flags, height, data, ntime):
         super(CoinbaseTransaction, self).__init__()
 
         #self.extranonce = 0
@@ -35,6 +35,7 @@ class CoinbaseTransaction(halfnode.CTransaction):
         tx_out.nValue = value
         tx_out.scriptPubKey = coinbaser.get_script_pubkey()
 
+        self.nTime = ntime # Coinbase timestamp
         self.vin.append(tx_in)
         self.vout.append(tx_out)