mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
rpc: /broadcast_evidence (#3481)
* implement broadcast_duplicate_vote endpoint * fix test_cover * address comments * address comments * Update abci/example/kvstore/persistent_kvstore.go Co-Authored-By: mossid <torecursedivine@gmail.com> * Update rpc/client/main_test.go Co-Authored-By: mossid <torecursedivine@gmail.com> * address comments in progress * reformat the code * make linter happy * make tests pass * replace BroadcastDuplicateVote with BroadcastEvidence * fix test * fix endpoint name * improve doc * fix TestBroadcastEvidenceDuplicateVote * Update rpc/core/evidence.go Co-Authored-By: Thane Thomson <connect@thanethomson.com> * add changelog entry * fix TestBroadcastEvidenceDuplicateVote
This commit is contained in:
committed by
Jack Zampolin
parent
17b69d4d56
commit
5ed39fd0b3
@ -333,6 +333,15 @@ func (c *baseRPCClient) Validators(height *int64) (*ctypes.ResultValidators, err
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (c *baseRPCClient) BroadcastEvidence(ev types.Evidence) (*ctypes.ResultBroadcastEvidence, error) {
|
||||
result := new(ctypes.ResultBroadcastEvidence)
|
||||
_, err := c.caller.Call("broadcast_evidence", map[string]interface{}{"evidence": ev}, result)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "BroadcastEvidence")
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// WSEvents
|
||||
|
||||
|
Reference in New Issue
Block a user