Skip to content

Commit

Permalink
quaiclient: added RPCMarshalBlock to send the block data to quai_api
Browse files Browse the repository at this point in the history
  • Loading branch information
shreekarashastry committed Jul 21, 2022
1 parent d6362de commit 276bcbc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ethclient/quaiclient/quaiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ func (ec *Client) GetBlockStatus(ctx context.Context, header *types.Header) Writ

func (ec *Client) HLCRReorg(ctx context.Context, block *types.Block) (bool, error) {
var domReorgNeeded bool
if err := ec.c.CallContext(ctx, &domReorgNeeded, "quai_hLCRReorg", block); err != nil {
data, err := RPCMarshalBlock(block, true, true)
if err != nil {
return false, err
}
if err := ec.c.CallContext(ctx, &domReorgNeeded, "quai_hLCRReorg", data); err != nil {
return false, err
}
return domReorgNeeded, nil
Expand Down

0 comments on commit 276bcbc

Please sign in to comment.