Consensus API endpoint height and block hash do not match
BUG REPORT
I was expecting currentblock
and height
from [GET] /consensus
to match up. When syncing however this doesn't seem to always be the case:
Stack Trace or error message
N/A
Expected Behavior
{
"synced": false,
"height": 13720,
"currentblock": "00000000000065ff7741cd837e97bf6ef6a8f73d39b4465d3a6f882feb9eca0c",
...
currentblock
corresponds to the hash of height 13720.
Observed Behavior
{
"synced": false,
"height": 13720,
"currentblock": "00000000000100c24c9034c0febd007a7968a696f7c6911be6a1b15832a29c0f",
...
currentblock
corresponds to the hash of height 13710 not, 13720 as shown.
How to reproduce it (as minimally and precisely as possible)
- Start syncing from scratch
- Call the
[GET] /consensus
endpoint - Check
currentblock
against Sia's[GET] /consensus/block
endpoint
occasionally height
and currentblock
will become desynchronized
Environment
- Sia version: v1.4.1.2
- OS: Ubuntu 18.10