I'm working on trying to implement the eth_getSyncing RPC call currently.
Having some ~trouble~ fun trying to figure out how to handle the response.
Return value:
Object|Boolean - A sync object as follows, when the node is currently syncing or false:
* startingBlock: Number - The block number where the sync started.
* currentBlock: Number - The block number where at which block the node currently synced to already.
* highestBlock: Number - The estimated block number to sync to.
Currently I don't think I can do it just with unsafeCoerceWeb3 and remote, since JSON decoding is done deeper than that and I can't pass in a custom decoder.
Going to keep playing with it, though any pointers would be greatly appreciated. I don't think any methods currently implemented handle these sorts of cases.
Will paste up code or a PR if I solve the issue. Preferably I don't want to resort to the FFI and Web3.js.
Current plan is for eth_getSyncing to return a Maybe { startingBlock :: Int, currentBlock :: Int, highestBlock :: Int }
I'm working on trying to implement the eth_getSyncing RPC call currently.
Having some ~trouble~ fun trying to figure out how to handle the response.
Return value:
Currently I don't think I can do it just with
unsafeCoerceWeb3
andremote
, since JSON decoding is done deeper than that and I can't pass in a custom decoder.Going to keep playing with it, though any pointers would be greatly appreciated. I don't think any methods currently implemented handle these sorts of cases.
Will paste up code or a PR if I solve the issue. Preferably I don't want to resort to the FFI and Web3.js.
Current plan is for
eth_getSyncing
to return aMaybe { startingBlock :: Int, currentBlock :: Int, highestBlock :: Int }