def sign_tx(self, priv_key):
    hash_tx = self.calculate_hash()
    self.signature = ecdsa.sign(hash_tx, priv_key, hashfunc=sha256)
def sign_tx(self, priv_key):
    hash_tx = self.calculate_hash()
    self.signature = ecdsa.sign(hash_tx, priv_key, hashfunc=sha256)