dust threshold
This commit is contained in:
parent
4f15ea12e4
commit
e4cdc4da0f
|
@ -37,6 +37,7 @@ from transaction import Transaction
|
||||||
from plugins import run_hook
|
from plugins import run_hook
|
||||||
|
|
||||||
COINBASE_MATURITY = 100
|
COINBASE_MATURITY = 100
|
||||||
|
DUST_THRESHOLD = 5430
|
||||||
|
|
||||||
# AES encryption
|
# AES encryption
|
||||||
EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s))
|
EncodeAES = lambda secret, s: base64.b64encode(aes.encryptData(secret,s))
|
||||||
|
@ -1185,7 +1186,7 @@ class Wallet:
|
||||||
def add_tx_change( self, inputs, outputs, amount, fee, total, change_addr=None):
|
def add_tx_change( self, inputs, outputs, amount, fee, total, change_addr=None):
|
||||||
"add change to a transaction"
|
"add change to a transaction"
|
||||||
change_amount = total - ( amount + fee )
|
change_amount = total - ( amount + fee )
|
||||||
if change_amount != 0:
|
if change_amount > DUST_THRESHOLD:
|
||||||
if not change_addr:
|
if not change_addr:
|
||||||
|
|
||||||
# send change to one of the accounts involved in the tx
|
# send change to one of the accounts involved in the tx
|
||||||
|
|
Loading…
Reference in New Issue