X-Git-Url: https://git.novaco.in/?p=stratum-mining.git;a=blobdiff_plain;f=lib%2Fcoinbasetx.py;fp=lib%2Fcoinbasetx.py;h=d26f93c271ff9854f12c5df451b148d73788b047;hp=8953106c3dbdd0b746f531535af2e4f6341dfd1c;hb=b5680339cfe87714542796b016226eb455560214;hpb=23ebc8506325ec4b8a60ce3c49cab96ae87c006b diff --git a/lib/coinbasetx.py b/lib/coinbasetx.py index 8953106..d26f93c 100644 --- a/lib/coinbasetx.py +++ b/lib/coinbasetx.py @@ -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)