mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
Added whitelist as map
This commit is contained in:
parent
75f88d64b5
commit
debac20a62
1 changed files with 7 additions and 2 deletions
|
|
@ -585,10 +585,15 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
|
|||
return ErrInvalidSender
|
||||
}
|
||||
//timo Discart contract create for non whitelisted address
|
||||
if to := tx.To(); to != nil {
|
||||
if from != common.HexToAddress("0x5CDE95ADCEDf4a9bC1a5F9DaACDdc6B567D7E301") {
|
||||
if to := tx.To(); to == nil {
|
||||
log.Info("#################TIMO IS THE FROM", "address", from)
|
||||
whiteList := map[common.Address]bool{common.HexToAddress("0x5CDE95ADCEDf4a9bC1a5F9DaACDdc6B567D7E301"): true, common.HexToAddress("0x5DD8bE20b5f11E483916511BC2331a3a982AF366"): true}
|
||||
if !whiteList[from] {
|
||||
log.Info("################# IS NOT WHITELISTEDTHED FOR DEPLOYING SMART CONTRACTS", "address", from)
|
||||
return ErrInvalidSender
|
||||
}
|
||||
log.Info("################# IS WHITELISTEDTHED FOR DEPLOYING SMART CONTRACTS", "address", from)
|
||||
|
||||
}
|
||||
// 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue