From 239ee2437c78ce48fbd957b11ba068b8cfb8a60f Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 22 Apr 2020 03:27:10 -0300 Subject: [PATCH] estimate only whats not downloaded --- lbry/wallet/header.py | 7 +++++-- tests/unit/wallet/test_headers.py | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lbry/wallet/header.py b/lbry/wallet/header.py index de366d802..fc9018562 100644 --- a/lbry/wallet/header.py +++ b/lbry/wallet/header.py @@ -136,6 +136,9 @@ class Headers: def estimated_timestamp(self, height): if height <= 0: return + if self.has_header(height): + offset = height * self.header_size + return struct.unpack('