Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lnd 377 refactor rpc tests divide by logic groups #23

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f438079
rpc table test
vasylNaumenko May 3, 2024
22e8dd5
preliminary version of combination of table tests, and business logic…
May 8, 2024
ea77bce
draft unit tests
May 14, 2024
14172cc
proxy app checkTx empty response
May 14, 2024
cfa4c6f
add implementation of test abci service
May 15, 2024
e53cfa1
add flexibility to imitate block build process
May 16, 2024
9d3e403
add Id param to BlockAccept call
May 16, 2024
0302d7f
add status service test
May 21, 2024
e5ec648
key encoding to hex
May 23, 2024
62f84d6
fix mistake: mempool size will not increase after build block
May 23, 2024
8f18c71
finalize network service unit test
May 27, 2024
cbae024
finalize status service unit test
May 27, 2024
506e827
preliminary version of history and sign client
May 30, 2024
a97d86f
finalize tests for history client
Jun 4, 2024
ef429c5
compare app hash of block to previous state
Jun 6, 2024
17fe339
fix test block production
Jun 6, 2024
f52c563
introduce test block results
Jun 10, 2024
658f87e
implement BlockSearch unit test
Jun 10, 2024
d2e0ff5
implement TxSearch unit test
Jun 10, 2024
baa117f
implement commit rpc unit test
Jun 10, 2024
2bf28b9
fix block by hash params input to appropriate format
Jun 11, 2024
d8a5795
introduce unconfirmed txs unit test
Jun 11, 2024
eea7354
check tx unit test implementation
Jun 12, 2024
f83ac1e
add test cases for Check Tx unit test
Jun 13, 2024
daad1f4
put off checks of unimplemented rpc tests until later. Clean up code
Jun 18, 2024
abc78af
fix U1000 staticcheck: use unused non-imported tests
Jun 19, 2024
262636d
get rid of new block unnecessary log
Jun 20, 2024
f2809c2
get rid of new block unnecessary log
Jun 20, 2024
0188a44
Merge remote-tracking branch 'origin/LND-377-refactor-rpc-tests-divid…
Jun 20, 2024
bc31a58
wait for state to be updated
Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions jsonrpc/http_json_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han
cache = false
}

logger.Info("calling func", "method", request.Method, "args", args)
returns := rpcFunc.f.Call(args)
result, err := unreflectResult(returns)
logger.Info("result of calling func for %s: err: %s", request.Method, err)

if err != nil {
logger.Debug("unexpected result", "method", request.Method, "err", err)
responses = append(responses, types.RPCInternalError(request.ID, err))
continue
}
Expand Down
6 changes: 3 additions & 3 deletions vm/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ func (rpc *RPC) Routes() map[string]*jsonrpc.RPCFunc {
"commit": jsonrpc.NewRPCFunc(rpc.Commit, "height", jsonrpc.Cacheable("height")),
// "header": jsonrpc.NewRPCFunc(rpc.Header, "height", jsonrpc.Cacheable("height")),
// "header_by_hash": jsonrpc.NewRPCFunc(rpc.HeaderByHash, "hash", jsonrpc.Cacheable()),
"check_tx": jsonrpc.NewRPCFunc(rpc.CheckTx, "tx"),
"tx": jsonrpc.NewRPCFunc(rpc.Tx, "hash,prove", jsonrpc.Cacheable()),
// "consensus_state": jsonrpc.NewRPCFunc(rpc.GetConsensusState, ""),
"check_tx": jsonrpc.NewRPCFunc(rpc.CheckTx, "tx"),
"tx": jsonrpc.NewRPCFunc(rpc.Tx, "hash,prove", jsonrpc.Cacheable()),
"consensus_state": jsonrpc.NewRPCFunc(rpc.GetConsensusState, ""),
"unconfirmed_txs": jsonrpc.NewRPCFunc(rpc.UnconfirmedTxs, "limit"),
"num_unconfirmed_txs": jsonrpc.NewRPCFunc(rpc.NumUnconfirmedTxs, ""),
"tx_search": jsonrpc.NewRPCFunc(rpc.TxSearch, "query,prove,page,per_page,order_by"),
Expand Down
Loading
Loading