def make_mint(pubkey, DB): address = tools.make_address([reward_address], 1) return { 'type': 'mint', 'pubkeys': [pubkey], 'signatures': ['first_sig'], 'count': blockchain.count(address, DB) }
def easy_add_transaction(tx_orig, privkey, DB): tx = copy.deepcopy(tx_orig) pubkey = pt.privtopub(privkey) try: tx['count'] = blockchain.count(pubkey, DB) except: tx['count'] = 1 tx['signature'] = pt.ecdsa_sign(tools.det_hash(tx), privkey) blockchain.add_tx(tx, DB)
def easy_add_transaction(tx_orig, privkey, DB): tx=copy.deepcopy(tx_orig) pubkey=tools.privtopub(privkey) address=tools.make_address([pubkey], 1) try: tx['count']=blockchain.count(address, DB) except: tx['count']=1 tx['signatures']=[tools.sign(tools.det_hash(tx), privkey)] blockchain.add_tx(tx, DB)
def easy_add_transaction(tx_orig, privkey, DB): tx=copy.deepcopy(tx_orig) pubkey=tools.privtopub(privkey) try: tx['count']=blockchain.count(pubkey, DB) except: tx['count']=1 tx['signature']=[tools.sign(tools.det_hash(tx), privkey)] print('CREATED TX: ' +str(tx)) blockchain.add_tx(tx, DB)
def easy_add_transaction(tx_orig, privkey, DB): tx = copy.deepcopy(tx_orig) pubkey = tools.privtopub(privkey) address = tools.make_address([pubkey], 1) try: tx['count'] = blockchain.count(address, DB) except: tx['count'] = 1 tx['signatures'] = [tools.sign(tools.det_hash(tx), privkey)] blockchain.add_tx(tx, DB)
def make_mint(pubkey, DB): return {'type':'mint', 'id':[pubkey], 'signature':['first_sig'], 'count':blockchain.count(pubkey, DB)} def genesis(pubkey, DB):
def make_mint(pubkey, DB): address = tools.make_address([reward_address], 1) return {'type': 'mint', 'pubkeys': [pubkey], 'signatures': ['first_sig'], 'count': blockchain.count(address, DB)}
def make_mint(pubkey, DB): return {'type':'mint', 'id':pubkey, 'count':blockchain.count(pubkey, DB)} def genesis(pubkey, DB):