1
0

Preparation for moving the set of verified and unverified txs to the wallet.

The verifier will retain responsibility for verification, but will no longer
hold the transaction sets itself.

Change requires_fee to take a wallet.
Add new function add_unverified_tx()
Move get_confirmations() to the wallet from the verifier.
This commit is contained in:
Neil Booth
2015-05-07 08:52:34 +09:00
parent ffda5cd866
commit 79de458101
7 changed files with 52 additions and 52 deletions

View File

@@ -813,7 +813,7 @@ class ElectrumWindow:
self.show_message(str(e))
return
if tx.requires_fee(self.wallet.verifier) and fee < MIN_RELAY_TX_FEE:
if tx.requires_fee(self.wallet) and fee < MIN_RELAY_TX_FEE:
self.show_message( "This transaction requires a higher fee, or it will not be propagated by the network." )
return
@@ -1200,7 +1200,7 @@ class ElectrumWindow:
tx = self.wallet.transactions.get(tx_hash)
tx.deserialize()
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(tx)
conf, timestamp = self.wallet.verifier.get_confirmations(tx_hash)
conf, timestamp = self.wallet.get_confirmations(tx_hash)
if timestamp:
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]

View File

@@ -1121,7 +1121,7 @@ class ElectrumWindow(QMainWindow):
self.show_message(str(e))
return
if tx.get_fee() < MIN_RELAY_TX_FEE and tx.requires_fee(self.wallet.verifier):
if tx.get_fee() < MIN_RELAY_TX_FEE and tx.requires_fee(self.wallet):
QMessageBox.warning(self, _('Error'), _("This transaction requires a higher fee, or it will not be propagated by the network."), _('OK'))
return

View File

@@ -149,7 +149,7 @@ class TxDialog(QDialog):
status = _("Signed")
if tx_hash in self.wallet.transactions.keys():
conf, timestamp = self.wallet.verifier.get_confirmations(tx_hash)
conf, timestamp = self.wallet.get_confirmations(tx_hash)
if timestamp:
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
else: