From 276bcbceb9ec3a0984c231d40ce8fed238fbc30c Mon Sep 17 00:00:00 2001 From: shreekara shastry <66725577+shreekarashastry@users.noreply.github.com> Date: Thu, 21 Jul 2022 15:56:58 -0500 Subject: [PATCH] quaiclient: added RPCMarshalBlock to send the block data to quai_api --- ethclient/quaiclient/quaiclient.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ethclient/quaiclient/quaiclient.go b/ethclient/quaiclient/quaiclient.go index 3c5626ff95..370530cec2 100644 --- a/ethclient/quaiclient/quaiclient.go +++ b/ethclient/quaiclient/quaiclient.go @@ -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