Skip to content

Commit

Permalink
Feature/fix_some_tests (#387)
Browse files Browse the repository at this point in the history
* same fix as ethereum/go-ethereum#15783
* Fix insufficient balance for transfer
* change chainId of QuorumTestChainConfig
  • Loading branch information
tsuzukit authored and jpmsam committed Jun 4, 2018
1 parent fd0e3b9 commit 52f137c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions cmd/geth/misccmd.go
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions core/blockchain_test.go
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions params/config.go
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions whisper/whisperv2/whisper.go
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit 52f137c

Please sign in to comment.