mirror of https://github.com/poanetwork/quorum.git
Feature/fix_some_tests (#387)
* same fix as ethereum/go-ethereum#15783 * Fix insufficient balance for transfer * change chainId of QuorumTestChainConfig
This commit is contained in:
parent
fd0e3b9d13
commit
52f137c850
|
@ -134,7 +134,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with geth. If not, see <http://www.gnu.org/licenses/>.
|
along with geth. If not, see <http://www.gnu.org/licenses/>.`)
|
||||||
`)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ func TestEIP155Transition(t *testing.T) {
|
||||||
funds = big.NewInt(1000000000)
|
funds = big.NewInt(1000000000)
|
||||||
deleteAddr = common.Address{1}
|
deleteAddr = common.Address{1}
|
||||||
gspec = &Genesis{
|
gspec = &Genesis{
|
||||||
Config: ¶ms.ChainConfig{ChainId: big.NewInt(1), EIP155Block: big.NewInt(2), HomesteadBlock: new(big.Int)},
|
Config: ¶ms.ChainConfig{ChainId: big.NewInt(10), EIP155Block: big.NewInt(2), HomesteadBlock: new(big.Int)},
|
||||||
Alloc: GenesisAlloc{address: {Balance: funds}, deleteAddr: {Balance: new(big.Int)}},
|
Alloc: GenesisAlloc{address: {Balance: funds}, deleteAddr: {Balance: new(big.Int)}},
|
||||||
}
|
}
|
||||||
genesis = gspec.MustCommit(db)
|
genesis = gspec.MustCommit(db)
|
||||||
|
@ -1142,7 +1142,7 @@ func TestEIP161AccountRemoval(t *testing.T) {
|
||||||
theAddr = common.Address{1}
|
theAddr = common.Address{1}
|
||||||
gspec = &Genesis{
|
gspec = &Genesis{
|
||||||
Config: ¶ms.ChainConfig{
|
Config: ¶ms.ChainConfig{
|
||||||
ChainId: big.NewInt(1),
|
ChainId: big.NewInt(10),
|
||||||
HomesteadBlock: new(big.Int),
|
HomesteadBlock: new(big.Int),
|
||||||
EIP155Block: new(big.Int),
|
EIP155Block: new(big.Int),
|
||||||
EIP158Block: big.NewInt(2),
|
EIP158Block: big.NewInt(2),
|
||||||
|
|
|
@ -110,10 +110,10 @@ var (
|
||||||
// adding flags to the config to also have to set these fields.
|
// adding flags to the config to also have to set these fields.
|
||||||
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil, false}
|
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil, false}
|
||||||
|
|
||||||
TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil, false}
|
TestChainConfig = &ChainConfig{big.NewInt(10), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil, false}
|
||||||
TestRules = TestChainConfig.Rules(new(big.Int))
|
TestRules = TestChainConfig.Rules(new(big.Int))
|
||||||
|
|
||||||
QuorumTestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, nil, common.Hash{}, nil, nil, nil, new(EthashConfig), nil, nil, true}
|
QuorumTestChainConfig = &ChainConfig{big.NewInt(10), big.NewInt(0), nil, false, nil, common.Hash{}, nil, nil, nil, new(EthashConfig), nil, nil, true}
|
||||||
)
|
)
|
||||||
|
|
||||||
// ChainConfig is the core config which determines the blockchain settings.
|
// ChainConfig is the core config which determines the blockchain settings.
|
||||||
|
|
|
@ -262,7 +262,7 @@ func (self *Whisper) add(envelope *Envelope) error {
|
||||||
// Insert the message into the tracked pool
|
// Insert the message into the tracked pool
|
||||||
hash := envelope.Hash()
|
hash := envelope.Hash()
|
||||||
if _, ok := self.messages[hash]; ok {
|
if _, ok := self.messages[hash]; ok {
|
||||||
log.Trace(fmt.Sprintf("whisper envelope already cached: %x\n", envelope))
|
log.Trace(fmt.Sprintf("whisper envelope already cached: %x\n", hash))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
self.messages[hash] = envelope
|
self.messages[hash] = envelope
|
||||||
|
@ -277,7 +277,7 @@ func (self *Whisper) add(envelope *Envelope) error {
|
||||||
// Notify the local node of a message arrival
|
// Notify the local node of a message arrival
|
||||||
go self.postEvent(envelope)
|
go self.postEvent(envelope)
|
||||||
}
|
}
|
||||||
log.Trace(fmt.Sprintf("cached whisper envelope %x\n", envelope))
|
log.Trace(fmt.Sprintf("cached whisper envelope %x\n", hash))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue