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:
Tomoaki Tsuzuki 2018-06-05 05:02:09 +09:00 committed by Samer Falah
parent fd0e3b9d13
commit 52f137c850
4 changed files with 7 additions and 8 deletions

View File

@ -134,7 +134,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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
}

View File

@ -1037,7 +1037,7 @@ func TestEIP155Transition(t *testing.T) {
funds = big.NewInt(1000000000)
deleteAddr = common.Address{1}
gspec = &Genesis{
Config: &params.ChainConfig{ChainId: big.NewInt(1), EIP155Block: big.NewInt(2), HomesteadBlock: new(big.Int)},
Config: &params.ChainConfig{ChainId: big.NewInt(10), EIP155Block: big.NewInt(2), HomesteadBlock: new(big.Int)},
Alloc: GenesisAlloc{address: {Balance: funds}, deleteAddr: {Balance: new(big.Int)}},
}
genesis = gspec.MustCommit(db)
@ -1142,7 +1142,7 @@ func TestEIP161AccountRemoval(t *testing.T) {
theAddr = common.Address{1}
gspec = &Genesis{
Config: &params.ChainConfig{
ChainId: big.NewInt(1),
ChainId: big.NewInt(10),
HomesteadBlock: new(big.Int),
EIP155Block: new(big.Int),
EIP158Block: big.NewInt(2),

View File

@ -110,10 +110,10 @@ var (
// 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}
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))
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.

View File

@ -262,7 +262,7 @@ func (self *Whisper) add(envelope *Envelope) error {
// Insert the message into the tracked pool
hash := envelope.Hash()
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
}
self.messages[hash] = envelope
@ -277,7 +277,7 @@ func (self *Whisper) add(envelope *Envelope) error {
// Notify the local node of a message arrival
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
}