Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lbtsm committed Apr 24, 2024
1 parent ebc0928 commit f87e57d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions internal/chain/block_map2other.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package chain
import (
"context"
"fmt"
"math/big"
"strings"
"time"

Expand All @@ -24,22 +23,14 @@ func (w *Writer) execMap2OtherMsg(m msg.Message) bool {
case <-w.stop:
return false
default:
id, _ := m.Payload[0].(*big.Int)
marshal, _ := m.Payload[1].([]byte)
err := w.conn.LockAndUpdateOpts(needNonce)
if err != nil {
w.log.Error("Failed to update nonce", "err", err)
time.Sleep(constant.TxRetryInterval)
continue
}

data, err := mapprotocol.PackInput(mapprotocol.LightManger, mapprotocol.MethodUpdateBlockHeader, id, marshal)
if err != nil {
w.log.Error("map2other Failed to pack abi data", "err", err)
w.conn.UnlockOpts()
return false
}
tx, err := w.sendTx(&w.cfg.LightNode, nil, data)
tx, err := w.sendTx(&w.cfg.LightNode, nil, m.Payload[0].([]byte))
w.conn.UnlockOpts()
if err == nil {
// message successfully handled
Expand Down

0 comments on commit f87e57d

Please sign in to comment.