Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func NewSimulatedBackend(alloc core.GenesisAlloc, gasLimit uint64) *SimulatedBac
database := ethdb.NewMemDatabase()
genesis := core.Genesis{Config: params.AllEthashProtocolChanges, GasLimit: gasLimit, Alloc: alloc}
genesisBlock := genesis.MustCommit(database)
blocks, _ := core.GenerateChain(genesis.Config, genesisBlock, ethash.NewFaker(), database.NewBatch(), 1, func(int, *core.BlockGen) {})
blocks, _ := core.GenerateChain(genesis.Config, genesisBlock, ethash.NewFaker(), database.MemCopy(), 1, func(int, *core.BlockGen) {})
blockchain, err := core.NewBlockChain(database, nil, genesis.Config, ethash.NewFaker(), vm.Config{}, nil)
if err != nil {
panic(fmt.Sprintf("%v", err))
Expand Down Expand Up @@ -110,7 +110,7 @@ func (b *SimulatedBackend) Rollback() {
}

func (b *SimulatedBackend) rollback() {
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.NewBatch(), 1, func(int, *core.BlockGen) {})
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.MemCopy(), 1, func(int, *core.BlockGen) {})

b.pendingBlock = blocks[0]
b.pendingTds = b.blockchain.GetTrieDbState()
Expand Down Expand Up @@ -314,11 +314,11 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transa
panic(fmt.Errorf("invalid transaction nonce: got %d, want %d", tx.Nonce(), nonce))
}

blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.NewBatch(), 1, func(number int, block *core.BlockGen) {
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.MemCopy(), 1, func(number int, block *core.BlockGen) {
for _, tx := range b.pendingBlock.Transactions() {
block.AddTxWithChain(b.blockchain, tx)
block.AddTx(tx)
}
block.AddTxWithChain(b.blockchain, tx)
block.AddTx(tx)
})

b.pendingBlock = blocks[0]
Expand Down Expand Up @@ -399,7 +399,7 @@ func (b *SimulatedBackend) SubscribeFilterLogs(ctx context.Context, query ethere
func (b *SimulatedBackend) AdjustTime(adjustment time.Duration) error {
b.mu.Lock()
defer b.mu.Unlock()
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.NewBatch(), 1, func(number int, block *core.BlockGen) {
blocks, _ := core.GenerateChain(b.config, b.blockchain.CurrentBlock(), ethash.NewFaker(), b.database.MemCopy(), 1, func(number int, block *core.BlockGen) {
for _, tx := range b.pendingBlock.Transactions() {
block.AddTx(tx)
}
Expand Down
2 changes: 1 addition & 1 deletion common/fdlimit/fdlimit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestFileDescriptorLimits(t *testing.T) {
if limit, err := Current(); err != nil || limit <= 0 {
t.Fatalf("failed to retrieve file descriptor limit (%d): %v", limit, err)
}
if err := Raise(uint64(target)); err != nil {
if _, err := Raise(uint64(target)); err != nil {
t.Fatalf("failed to raise file allowance")
}
if limit, err := Current(); err != nil || limit < target {
Expand Down
68 changes: 0 additions & 68 deletions contracts/chequebook/api.go

This file was deleted.

Loading