Skip to content

Commit

Permalink
fix linewallet type error
Browse files Browse the repository at this point in the history
  • Loading branch information
hclivess committed Jan 6, 2023
1 parent 0e182be commit a6df566
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion consistency_checker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from log_ops import get_logger
from block_ops import load_block_from_hash
import pandas as pd


logger = get_logger()
block_hash = "6514c2b2fac0d1e820c1d24dbcf36dd34532b59ed4c268b15c341663ce505b9f"

miners = []

def check_consistency(block_hash, logger):
old_block_number = 0
Expand All @@ -14,6 +16,8 @@ def check_consistency(block_hash, logger):
block = load_block_from_hash(block_hash, logger=logger)
block_hash = block["child_hash"]
block_number = block["block_number"]
if block_number > 11000:
miners.append(block["block_creator"])

if block_number == old_block_number + 1:
oks += 1
Expand All @@ -25,3 +29,9 @@ def check_consistency(block_hash, logger):


print(check_consistency(block_hash, logger))

#print(miners)
pd.set_option("display.max_rows", None)
count = pd.Series(miners).value_counts()
print("Element Count")
print(count)
2 changes: 1 addition & 1 deletion linewallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def send_transaction(address, recipient, amount, data, public_key, private_key,
public_key=public_key,
private_key=private_key,
timestamp=get_timestamp_seconds(),
target_block=target_block)
target_block=int(target_block))

print(json.dumps(transaction, indent=4))
input("Press any key to continue")
Expand Down

0 comments on commit a6df566

Please sign in to comment.