From 75f88d64b5e7debd399f9a89cd54e621bc8a6300 Mon Sep 17 00:00:00 2001 From: Timo Hedke Date: Wed, 12 Dec 2018 14:30:18 -0300 Subject: [PATCH] Added contract create whitelist --- core/tx_pool.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tx_pool.go b/core/tx_pool.go index fc35d1f243..9a995f11ef 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -584,6 +584,12 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { if err != nil { return ErrInvalidSender } + //timo Discart contract create for non whitelisted address + if to := tx.To(); to != nil { + if from != common.HexToAddress("0x5CDE95ADCEDf4a9bC1a5F9DaACDdc6B567D7E301") { + return ErrInvalidSender + } + } // Drop non-local transactions under our own minimal accepted gas price local = local || pool.locals.contains(from) // account may be local even if the transaction arrived from the network if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 {