HomePhabricator

[alias-server] Add RPC call for isFinalBlock

Description

[alias-server] Add RPC call for isFinalBlock

Summary:
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.

Test Plan:

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13521

Details

Provenance
bytesofmanAuthored on Mar 31 2023, 13:27
bytesofmanPushed on Apr 4 2023, 10:30
Reviewer
Restricted Project
Differential Revision
D13521: [alias-server] Add RPC call for isFinalBlock
Parents
rABC7c8aa5dc5c3b: [ecash-herald] Rename ecash-telegram-bot to ecash-herald
Branches
Unknown
Tags
Unknown