From dc96f38c08298cf1ef4a3fd1734b2650aa8583a7 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Sat, 18 Apr 2015 10:15:46 +0100 Subject: [PATCH] payment: fix unlock time semantics It's a delta height not a block height --- tipbot/modules/payment.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tipbot/modules/payment.py b/tipbot/modules/payment.py index 12c8771..f269be8 100644 --- a/tipbot/modules/payment.py +++ b/tipbot/modules/payment.py @@ -99,7 +99,7 @@ def UpdateCoin(data): continue log_log('UpdateCoin: Looking at payment %s' % str(p)) confirmations = height-1-bh - confirmations_needed = max(config.payment_confirmations,ut-height) + confirmations_needed = max(config.payment_confirmations,ut) if confirmations >= confirmations_needed: log_info('Payment %s is now confirmed' % str(p)) new_payments.append(p) @@ -135,7 +135,6 @@ def UpdateCoin(data): tx_hash=p["tx_hash"] amount=p["amount"] bh = p["block_height"] - ut = p["unlock_time"] try: recipient = GetIdentityFromPaymentID(payment_id) if not recipient: