From e610298b57c132a99e8a0d91abf9c1576a1b6be8 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Sat, 27 Oct 2018 10:20:08 +0530 Subject: [PATCH] Reject all transactions to blocksigners with rpc ipc --- internal/ethapi/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 9e898a16a4..c3062e0e1f 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1208,6 +1208,11 @@ 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 { + log.Debug("Dont Allow submitTransaction to BlockSigners through api ", tx.String()) + return tx.Hash(), nil + } + log.Debug("Allow submitTransaction through api ", tx.String()) if err := b.SendTx(ctx, tx); err != nil { return common.Hash{}, err }