Skip to content
Snippets Groups Projects
Commit 38a7ff59 authored by inso's avatar inso
Browse files

Fix potential bug when we send a transaction

If we send a transaction before having a good view of the network
There is a risk of seeing a transaction refused when its not
parent 62e7391f
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,10 @@ Created on 31 janv. 2015
@author: inso
"""
import logging
import asyncio
import time
from ucoinpy.api import bma
from ucoinpy.documents import Block, BlockId
from PyQt5.QtCore import pyqtSignal, QObject
import hashlib
from enum import Enum
......@@ -264,7 +263,7 @@ class Transfer(QObject):
:param ucoinpy.documents.Block current_block: Current block of the main blockchain
"""
self.blockid = current_block.blockid
self._metadata['time'] = current_block.mediantime
self._metadata['time'] = int(time.time())
def _be_validating(self, block):
"""
......
......@@ -175,7 +175,6 @@ class Wallet(QObject):
inputs = []
cache = self.caches[community.currency]
logging.debug("Available inputs : {0}".format(cache.available_sources))
buf_inputs = list(cache.available_sources)
for s in cache.available_sources:
value += s.amount
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment