diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-13 01:05:33 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-13 01:05:33 +0800 |
commit | 8e24378cc1acb074b56de75bf0baf6feb7927677 (patch) | |
tree | 71f866652de6b45da5ad4403b88f5def9a684e36 /core | |
parent | 7d69679935ff8c04aebb60f27074f08c5e84ac95 (diff) | |
parent | 8fe01b4bfa28ad5a1fdde7f9837e8f982843389a (diff) | |
download | dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.gz dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.bz2 dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.lz dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.xz dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.zst dexon-8e24378cc1acb074b56de75bf0baf6feb7927677.zip |
Merge branch 'release/0.9.20'
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager_test.go | 4 | ||||
-rw-r--r-- | core/events.go | 6 | ||||
-rw-r--r-- | core/manager.go | 2 | ||||
-rw-r--r-- | core/transaction_pool.go | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index 50915459b..f456e4fff 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -4,7 +4,7 @@ import ( "fmt" "math/big" "os" - "path" + "path/filepath" "runtime" "strconv" "testing" @@ -94,7 +94,7 @@ func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { } func loadChain(fn string, t *testing.T) (types.Blocks, error) { - fh, err := os.OpenFile(path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "_data", fn), os.O_RDONLY, os.ModePerm) + fh, err := os.OpenFile(filepath.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "_data", fn), os.O_RDONLY, os.ModePerm) if err != nil { return nil, err } diff --git a/core/events.go b/core/events.go index 3da668af5..1ea35c2f4 100644 --- a/core/events.go +++ b/core/events.go @@ -1,8 +1,10 @@ package core import ( - "github.com/ethereum/go-ethereum/core/types" + "math/big" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" ) // TxPreEvent is posted when a transaction enters the transaction pool. @@ -44,6 +46,8 @@ type ChainUncleEvent struct { type ChainHeadEvent struct{ Block *types.Block } +type GasPriceChanged struct{ Price *big.Int } + // Mining operation events type StartMining struct{} type TopMining struct{} diff --git a/core/manager.go b/core/manager.go index 9b5407a9e..433ada7ee 100644 --- a/core/manager.go +++ b/core/manager.go @@ -1,12 +1,14 @@ package core import ( + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/p2p" ) type Backend interface { + AccountManager() *accounts.Manager BlockProcessor() *BlockProcessor ChainManager() *ChainManager TxPool() *TxPool diff --git a/core/transaction_pool.go b/core/transaction_pool.go index 6898a4bda..e68f7406a 100644 --- a/core/transaction_pool.go +++ b/core/transaction_pool.go @@ -21,7 +21,7 @@ var ( ErrInvalidSender = errors.New("Invalid sender") ErrNonce = errors.New("Nonce too low") ErrBalance = errors.New("Insufficient balance") - ErrNonExistentAccount = errors.New("Account does not exist") + ErrNonExistentAccount = errors.New("Account does not exist or account balance too low") ErrInsufficientFunds = errors.New("Insufficient funds for gas * price + value") ErrIntrinsicGas = errors.New("Intrinsic gas too low") ErrGasLimit = errors.New("Exceeds block gas limit") |