def spend_verify(tx, txs, DB): tx_copy=copy.copy(tx) tx_copy.pop('signature') if not pt.ecdsa_verify(tools.det_hash(tx_copy), tx['signature'], tx['id']): return False if tx['amount']<custom.fee: return False if int(blockchain.db_get(tx['id'], DB)['amount'])<int(tx['amount']): return False return True
def spend_verify(tx, txs, DB): tx_copy = copy.copy(tx) tx_copy.pop("signature") msg = tools.det_hash(tx_copy) if not pt.ecdsa_verify(msg, tx["signature"], tx["id"]): return False if tx["amount"] < custom.fee: return False if int(blockchain.db_get(tx["id"], DB)["amount"]) < int(tx["amount"]): return False return True
def verify(msg, sig, pubkey): return pt.ecdsa_verify(msg, sig, pubkey) def privtopub(privkey): return pt.privtopub(privkey)
def verify(msg, sig, pubkey): return pt.ecdsa_verify(msg, sig, pubkey)
def verify(msg, sig, pubkey): print('msg, sig, pubkey: ' +str(msg) + ' ' + str(sig) + ' ' + str(pubkey)) return pt.ecdsa_verify(msg, sig, pubkey)