mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
more stuff
This commit is contained in:
parent
db82bc9603
commit
e6fdff4860
2 changed files with 11 additions and 5 deletions
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/ethdb"
|
"github.com/ethereum/go-ethereum/ethdb"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -16,6 +15,8 @@ const (
|
||||||
|
|
||||||
//var api *eth.PrivateDebugAPI
|
//var api *eth.PrivateDebugAPI
|
||||||
|
|
||||||
|
var EthereumObject interface{}
|
||||||
|
|
||||||
var Chaindb_global ethdb.Database
|
var Chaindb_global ethdb.Database
|
||||||
|
|
||||||
func SetChainDB(db ethdb.Database){
|
func SetChainDB(db ethdb.Database){
|
||||||
|
|
@ -52,4 +53,8 @@ func MyTraceTransaction(hash string) (interface{}) {
|
||||||
fmt.Println(blockHash)
|
fmt.Println(blockHash)
|
||||||
fmt.Println(index)
|
fmt.Println(index)
|
||||||
return 42
|
return 42
|
||||||
|
}
|
||||||
|
|
||||||
|
func setEthObject(ethobj interface{}){
|
||||||
|
EthereumObject = ethobj
|
||||||
}
|
}
|
||||||
|
|
@ -49,10 +49,10 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var EthObject *Ethereum
|
|
||||||
|
|
||||||
var BlockchainObject *core.BlockChain
|
var BlockchainObject *core.BlockChain
|
||||||
|
|
||||||
|
var DebugApi *PrivateDebugAPI
|
||||||
|
|
||||||
type LesServer interface {
|
type LesServer interface {
|
||||||
Start(srvr *p2p.Server)
|
Start(srvr *p2p.Server)
|
||||||
Stop()
|
Stop()
|
||||||
|
|
@ -148,8 +148,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks),
|
bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks),
|
||||||
}
|
}
|
||||||
|
|
||||||
EthObject = eth
|
|
||||||
|
|
||||||
log.Info("Initialising Ethereum protocol", "versions", ProtocolVersions, "network", config.NetworkId)
|
log.Info("Initialising Ethereum protocol", "versions", ProtocolVersions, "network", config.NetworkId)
|
||||||
|
|
||||||
if !config.SkipBcVersionCheck {
|
if !config.SkipBcVersionCheck {
|
||||||
|
|
@ -197,6 +195,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
}
|
}
|
||||||
eth.ApiBackend.gpo = gasprice.NewOracle(eth.ApiBackend, gpoParams)
|
eth.ApiBackend.gpo = gasprice.NewOracle(eth.ApiBackend, gpoParams)
|
||||||
|
|
||||||
|
DebugApi.eth = eth
|
||||||
|
DebugApi.config = chainConfig
|
||||||
|
|
||||||
return eth, nil
|
return eth, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue