bitsharesjs icon indicating copy to clipboard operation
bitsharesjs copied to clipboard

Recognize that Node is out of sync and throw corresponding error

Open sschiessl-bcp opened this issue 7 years ago • 3 comments

If a node is out of sync, user still sees the "Sync clock" issue. Also include the chain head block and time in the thrown error.

https://github.com/bitshares/bitsharesjs/blob/6bad1cf876fb0a0737ca8f654d6615e1358ea758/lib/chain/src/ChainStore.js#L151

sschiessl-bcp avatar Dec 04 '18 11:12 sschiessl-bcp

also having same issues

M-Zeeshan-Haider avatar Jan 09 '19 13:01 M-Zeeshan-Haider

The thing is, when head block time of a node is some behind your local clock, it's possible that the node is out of sync, it's also possible that your local clock is too fast, even both. How the lib would know which one is wrong if there is no more info?

I just got an idea: the API server also returns server time E.G. via HTTP response header, perhaps we can use it to check what's the real reason.

abitmore avatar Jan 09 '19 17:01 abitmore

How the lib would know which one is wrong if there is no more info?

Good point, thanks!

sschiessl-bcp avatar Jan 21 '19 12:01 sschiessl-bcp