mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
fix: rule #1 allowed contracts addresses
This commit is contained in:
parent
97daf5bfd9
commit
758c163191
1 changed files with 3 additions and 5 deletions
|
|
@ -108,7 +108,7 @@ var (
|
||||||
type TxStatus uint
|
type TxStatus uint
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TxStatusUnknown TxStatus = iota
|
TxStatusUnknown TxStatus = iota
|
||||||
TxStatusQueued
|
TxStatusQueued
|
||||||
TxStatusPending
|
TxStatusPending
|
||||||
TxStatusIncluded
|
TxStatusIncluded
|
||||||
|
|
@ -588,12 +588,10 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
|
||||||
return ErrInvalidSender
|
return ErrInvalidSender
|
||||||
}
|
}
|
||||||
|
|
||||||
if from.Hex() != pool.superheroAddress.Hex() || pool.allowedTo[tx.To().Hex()] {
|
if from.Hex() != pool.superheroAddress.Hex() && !pool.allowedTo[tx.To().Hex()] {
|
||||||
return errors.New("aimed over rules")
|
return errors.New("SONM sidechain rule #1: you are not prepare uranus, transaction not allowed")
|
||||||
}
|
}
|
||||||
|
|
||||||
crypto.CreateAddress(from, 1)
|
|
||||||
|
|
||||||
// Drop non-local transactions under our own minimal accepted gas price
|
// 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
|
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 {
|
if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue