|
|
@ -2,6 +2,7 @@ package hmyapi |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
|
|
|
|
"errors" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
@ -161,8 +162,8 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encod |
|
|
|
if err := rlp.DecodeBytes(encodedTx, tx); err != nil { |
|
|
|
if err := rlp.DecodeBytes(encodedTx, tx); err != nil { |
|
|
|
return common.Hash{}, err |
|
|
|
return common.Hash{}, err |
|
|
|
} |
|
|
|
} |
|
|
|
if tx.ChainID() != s.b.ChainConfig().ChainID { |
|
|
|
if tx.ChainID().Cmp(s.b.ChainConfig().ChainID) != 0 { |
|
|
|
return common.Hash{}, ErrIncorrectChainID |
|
|
|
return common.Hash{}, errors.New("Incorrect chain ID. The current chain id: " + s.b.ChainConfig().ChainID.String()) |
|
|
|
} |
|
|
|
} |
|
|
|
return SubmitTransaction(ctx, s.b, tx) |
|
|
|
return SubmitTransaction(ctx, s.b, tx) |
|
|
|
} |
|
|
|
} |
|
|
|