Closed chanhsu001 closed 2 years ago
when ckb-cli rpc sync_state, the error message is: missing field "unknown_header_list_size"
ckb-cli rpc sync_state
missing field "unknown_header_list_size"
sync_state() in client.rs wrongly returns PeerSyncState instead of SyncState
PeerSyncState
SyncState
$ ./ckb-cli rpc sync_state best_known_block_number: 7211562 best_known_block_timestamp: "1653289577050 (2022-05-23 15:06:17.050 +08:00)" fast_time: 595 ibd: false inflight_blocks_count: 0 low_time: 1319 normal_time: 1136 orphan_blocks_count: 0
$ ./ckb-cli rpc sync_state --raw-data best_known_block_number: 0x6e0a2c best_known_block_timestamp: 0x180efbd198f fast_time: 0x253 ibd: false inflight_blocks_count: 0x0 low_time: 0x527 normal_time: 0x470 orphan_blocks_count: 0x0
For the inner rpc client it has been fixed in ckb-sdk v1.0.1, for the wrapper type (types::SyncState) please rebase the PR.
types::SyncState
https://github.com/nervosnetwork/ckb-sdk-rust/pull/8
Fixed in #472
when
ckb-cli rpc sync_state
, the error message is:missing field "unknown_header_list_size"
Cause
sync_state() in client.rs wrongly returns
PeerSyncState
instead ofSyncState
Fix
Verify
$ ./ckb-cli rpc sync_state best_known_block_number: 7211562 best_known_block_timestamp: "1653289577050 (2022-05-23 15:06:17.050 +08:00)" fast_time: 595 ibd: false inflight_blocks_count: 0 low_time: 1319 normal_time: 1136 orphan_blocks_count: 0
$ ./ckb-cli rpc sync_state --raw-data best_known_block_number: 0x6e0a2c best_known_block_timestamp: 0x180efbd198f fast_time: 0x253 ibd: false inflight_blocks_count: 0x0 low_time: 0x527 normal_time: 0x470 orphan_blocks_count: 0x0