mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #133 from nguyenbatam/reject_all_txs_to_blocksigners_with_rpc_ipc
Reject all transactions to blocksigners with rpc ipc
This commit is contained in:
commit
92a6000ba6
1 changed files with 3 additions and 0 deletions
|
|
@ -1208,6 +1208,9 @@ func (args *SendTxArgs) toTransaction() *types.Transaction {
|
|||
|
||||
// submitTransaction is a helper function that submits tx to txPool and logs a message.
|
||||
func submitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (common.Hash, error) {
|
||||
if tx.To() != nil && tx.To().String() == common.BlockSigners {
|
||||
return common.Hash{}, errors.New("Dont allow transaction sent to BlockSigners smart contract via API")
|
||||
}
|
||||
if err := b.SendTx(ctx, tx); err != nil {
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue