From a99d1c2da4e71b9b6f08ffd81cf25bb201339433 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Mon, 13 May 2019 16:56:57 +0400 Subject: [PATCH] connector --- pybtc/connector/utxo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pybtc/connector/utxo.py b/pybtc/connector/utxo.py index a5f1357..e270977 100644 --- a/pybtc/connector/utxo.py +++ b/pybtc/connector/utxo.py @@ -49,13 +49,13 @@ class UTXO(): self.save_process = True try: self.log.critical("cached " + str(len(self.cached)) ) - checkpoint = self.checkpoints.pop() + checkpoint = self.checkpoints.popleft() lb = 0 block_changed = False checkpoint_found = False utxo = set() while self.cached: - i = self.cached.pop() + i = self.cached.popleft() if lb != i[1][0] >> 42: block_changed = True lb = i[1][0] >> 42 @@ -81,7 +81,7 @@ class UTXO(): self.cached.append({i: self.pending_saved[i]}) self.log.critical("checkpoint not found " + str(self.checkpoints)) return - self.log.critical("checkpoints " + str(self.checkpoints)) + self.log.critical("checkpoints " + str(self.checkpoints) + " > " + str(checkpoint)) self.log.critical("found checkpoint " + str(lb) + " len " + str(len(utxo)) + " cached " + str(len(self.cached)) ) # self.log.critical(">" + str(len(self.cached)))