fix comparators to always allow duplicates

(reported by cohcho, thanks)
This commit is contained in:
Jethro Grassie 2020-01-02 19:12:40 -05:00
parent c7984e0e5f
commit 05fafe0fa4
No known key found for this signature in database
GPG key ID: DE8ED755616565BB
2 changed files with 22 additions and 10 deletions

5
tools/inspect-data vendored
View file

@ -126,12 +126,13 @@ def print_shares(path):
with env.begin(db=shares) as txn:
with txn.cursor() as curs:
curs.last()
for i in range(10):
for i in range(25):
key, value = curs.item()
height = c_longlong.from_buffer_copy(key).value
share = share_t.from_buffer_copy(value)
address = format_address(address_from_key(share.address))
print('{}\t{}'.format(height, address))
dt = format_timestamp(share.timestamp)
print('{}\t{}\t{}'.format(height, address, dt))
if not curs.prev():
break
env.close()