Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Add gateway: RPC mode and cli mode are unavailable #1797

Open
heliumsk1 opened this issue Aug 12, 2022 · 3 comments
Open

Add gateway: RPC mode and cli mode are unavailable #1797

heliumsk1 opened this issue Aug 12, 2022 · 3 comments

Comments

@heliumsk1
Copy link

Hi,

Tried using the JSONRPC mechanism to "add_gateway" but it didn't work.
JSONRPC command (sample)

Request:
curl -X POST
-H 'Content-Type: application/json'
-d '{"jsonrpc":"2.0","id":"id","method":"txn_add_gateway","params": { "owner" : "138LbePH4r7hWPuTnK6HXVJ8ATM2QU71iVHzLTup1UbnPDvbxmr", "payer" : "138LbePH4r7hWPuTnK6HXVJ8ATM2QU71iVHzLTup1UbnPDvbxmr"}}'
http://127.0.0.1:4467
esponse:
{"error":{"code":-150,"message":""function_clause""},"id":"id","jsonrpc":"2.0"}

docker exec miner miner txn add_gateway owner=138LbePH4r7hWPuTnK6HXVJ8ATM2QU71iVHzLTup1UbnPDvbxmr --payer 138LbePH4r7hWPuTnK6HXVJ8ATM2QU71iVHzLTup1UbnPDvbxmr

error: {error,function_clause,
[{blockchain,ledger,
[undefined],
[{file,"blockchain.erl"},{line,558}]},
{blockchain_txn_add_gateway_v1,calculate_staking_fee,2,
[{file,"blockchain_txn_add_gateway_v1.erl"},{line,200}]},
{blockchain,add_gateway_txn,4,
[{file,"blockchain.erl"},{line,2406}]},
{blockchain_cli_txn,txn_add_gateway,3,
[{file,"blockchain_cli_txn.erl"},{line,155}]},
{clique_command,run,1,[{file,"clique_command.erl"},{line,87}]},
{blockchain_console,command,1,
[{file,"blockchain_console.erl"},{line,14}]},
{erpc,execute_call,4,[{file,"erpc.erl"},{line,392}]}]}

image

@heliumsk1
Copy link
Author

[error] <0.1800.0>@miner_jsonrpc_txn:handle_rpc:{45,13} Couldn't do add gateway via JSONRPC because: error function_clause: [{blockchain,ledger,[undefined],[{file,"blockchain.erl"},{line,558}]},{blockchain_txn_add_gateway_v1,calculate_staking_fee,2,[{file,"blockchain_txn_add_gateway_v1.erl"},{line,200}]},{blockchain,add_gateway_txn,4,[{file,"blockchain.erl"},{line,2406}]},{miner_jsonrpc_txn,handle_rpc,2,[{file,"miner_jsonrpc_txn.erl"},{line,40}]},{jsonrpc2,dispatch,2,[{file,"jsonrpc2.erl"},{line,260}]},{jsonrpc2,handle,5,[{file,"jsonrpc2.erl"},{line,90}]},{miner_jsonrpc_handler,handle,3,[{file,"miner_jsonrpc_handler.erl"},{line,30}]},{elli_http,execute_callback,1,[{file,"elli_http.erl"},{line,287}]}]

@arduino43
Copy link

same issue

@arduino43
Copy link

Still same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants