T3060
Depends on D13633
Check isFinalBlock status. If block is not final, do not update aliases in handleBlockConnected.
Differential D13634
[alias-server] Check avalanche isFinalBlock in handleBlockConnected bytesofman on Apr 8 2023, 14:08. Authored by
Details
T3060 Depends on D13633 Check isFinalBlock status. If block is not final, do not update aliases in handleBlockConnected. npm test
Diff Detail
Event TimelineComment Actions Why don't you use the same strategy as chronik here to avoid axios ? Create a node object from the rpc url and some secrets (user/password), and pass it done the stack. This lets you create a mocked node that implements isFinalBlock and return whatever you want.
Comment Actions it would be nice to remove a dependency, but axios is pretty useful here. without it, would need to add logic for parsing server response, converting to json. Then also make a mock for that. axios is pretty standard for API calls in nodejs apps. might be used for other API calls in this app as well (e.g. XEC price).
Comment Actions handle this todo: TODO if not finalized, keep checking at set intervals until a given timeout
Comment Actions Improving log statement
|