接着上一篇,这里继续整合交易类。
import datetime
#交易类,后期需要整合公钥,私钥
class Transaction:
#payer 付款方,receiver收款方
def __init__(self,payer,receiver,money):
self.payer = payer
self.receiver = receiver
self.money = money
self.timestamp = datetime.datetime.now() #交易时间
def __repr__(self):
return str
1