mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-12-01 20:05:43 +03:00
Fix show issues
This commit is contained in:
parent
dc891f65e6
commit
5052eb730c
@ -150,7 +150,7 @@ async def show_async(args, parser):
|
||||
|
||||
if peak is not None:
|
||||
if peak.is_block:
|
||||
peak_time = peak.foliage_block.timestamp
|
||||
peak_time = peak.timestamp
|
||||
else:
|
||||
peak_hash = peak.header_hash
|
||||
curr = await client.get_sub_block_record(peak_hash)
|
||||
@ -176,7 +176,7 @@ async def show_async(args, parser):
|
||||
print(f"Current VDF sub_slot_iters: {sub_slot_iters}")
|
||||
print("Total iterations since the start of the blockchain:", total_iters)
|
||||
print("")
|
||||
print("SB Height | Height | Hash:")
|
||||
print("SB Height | Hash:")
|
||||
|
||||
added_blocks: List[SubBlockRecord] = []
|
||||
curr = await client.get_sub_block_record(peak.header_hash)
|
||||
|
@ -44,9 +44,7 @@ class FullNodeRpcClient(RpcClient):
|
||||
return None
|
||||
except Exception:
|
||||
return None
|
||||
json_res = response["sub_block_record"]
|
||||
del json_res["reward_claims_incorporated"]
|
||||
return SubBlockRecord.from_json_dict(json_res)
|
||||
return SubBlockRecord.from_json_dict(response["sub_block_record"])
|
||||
|
||||
async def get_unfinished_sub_block_headers(self) -> List[UnfinishedHeaderBlock]:
|
||||
response = await self.fetch("get_unfinished_sub_block_headers", {})
|
||||
|
@ -318,7 +318,9 @@ class ChiaServer:
|
||||
cert_bytes = transport._ssl_protocol._extra["ssl_object"].getpeercert(True) # type: ignore
|
||||
der_cert = x509.load_der_x509_certificate(cert_bytes, default_backend())
|
||||
peer_id = bytes32(der_cert.fingerprint(hashes.SHA256()))
|
||||
assert peer_id != self.node_id
|
||||
if peer_id == self.node_id:
|
||||
raise RuntimeError(f"Trying to connect to a peer ({target_node}) with the same peer_id: {peer_id}")
|
||||
|
||||
connection = WSChiaConnection(
|
||||
self._local_type,
|
||||
ws,
|
||||
|
@ -29,10 +29,10 @@ echo "Note that this simulation will not work if connected to external nodes."
|
||||
# Please note that the simulation is meant to be run locally and not connected to external nodes.
|
||||
# NOTE: you must run install.sh when changing this file
|
||||
|
||||
# _run_bg_cmd chia_farmer --logging.log_stdout=True --logging.log_level=INFO
|
||||
# _run_bg_cmd chia_harvester --logging.log_stdout=True --logging.log_level=INFO
|
||||
# _run_bg_cmd chia_timelord --logging.log_stdout=True --logging.log_level=INFO
|
||||
# _run_bg_cmd chia_timelord_launcher --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_farmer --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_harvester --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_timelord --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_timelord_launcher --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_introducer --logging.log_stdout=True --logging.log_level=INFO
|
||||
_run_bg_cmd chia_full_node --port=8444 --database_path="simulation_1.db" --rpc_port=8555 --introducer_peer.host="127.0.0.1" --introducer_peer.port=8445 --logging.log_stdout=True --logging.log_level=INFO --logging.log_level=INFO
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user