1
0

support for OP_RETURN

This commit is contained in:
ThomasV
2014-06-27 17:08:20 +02:00
parent 508d8a798f
commit 2efad717d8
4 changed files with 28 additions and 20 deletions

View File

@@ -350,7 +350,7 @@ class Abstract_Wallet:
raise Exception("Address not found", address)
def getpubkeys(self, addr):
assert is_valid(addr) and self.is_mine(addr)
assert is_address(addr) and self.is_mine(addr)
account, sequence = self.get_address_index(addr)
a = self.accounts[account]
return a.get_pubkeys( sequence )
@@ -779,7 +779,9 @@ class Abstract_Wallet:
def make_unsigned_transaction(self, outputs, fee=None, change_addr=None, domain=None, coins=None ):
for address, x in outputs:
assert is_valid(address), "Address " + address + " is invalid!"
if address.startswith('OP_RETURN:'):
continue
assert is_address(address), "Address " + address + " is invalid!"
amount = sum( map(lambda x:x[1], outputs) )
inputs, total, fee = self.choose_tx_inputs( amount, fee, len(outputs), domain, coins )
if not inputs: