T3060
Add a function to determine avalanche 'isfinalblock' status. Add a new test script to call this function. Modify schema of secrets.js to support rpc info for full node requests.
Differential D13521
[alias-server] Add RPC call for isFinalBlock bytesofman on Mar 31 2023, 13:42. Authored by
Details
T3060 Add a function to determine avalanche 'isfinalblock' status. Add a new test script to call this function. Modify schema of secrets.js to support rpc info for full node requests. cp secrets.sample.js secrets.js Enter your rpc call info (DM me if you need info for a test server) npm run rpc and response good Change scripts/testRpc.js so that const blockhash === 'foo' npm run rpc and get the error msg from the node (blockhash must be of length 64 (not 3, for 'foo')) Change your rpc params in secrets.js so that your url is bad npm run rpc, returns false, error msg is logged
Diff Detail
Event Timeline
Comment Actions I just noticed there is no copyright header in any of the files, that's something you need to fix in another diff
Comment Actions Improving code quality per diff review
Comment Actions
Added to T3060 Comment Actions It's much better now, only missing a unit test for isFinalBlock. You'll need to mock the node response here, and that will be useful to test the upper logic as well in later diffs.
|