Selaa lähdekoodia

Exposing stuff for ethash

Matthew Wampler-Doty 10 vuotta sitten
vanhempi
commit
ba1f4bbe91
3 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 3 0
      core/block_processor.go
  2. 0 2
      core/chain_manager_test.go
  3. 2 0
      pow/block.go

+ 3 - 0
core/block_processor.go

@@ -105,6 +105,9 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
 
 	return receipt, txGas, err
 }
+func (self *BlockProcessor) ChainManager() *ChainManager {
+	return self.bc
+}
 
 func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, statedb *state.StateDB, block *types.Block, txs types.Transactions, transientProcess bool) (types.Receipts, types.Transactions, types.Transactions, types.Transactions, error) {
 	var (

+ 0 - 2
core/chain_manager_test.go

@@ -14,9 +14,7 @@ import (
 	"github.com/ethereum/go-ethereum/ethdb"
 	"github.com/ethereum/go-ethereum/ethutil"
 	"github.com/ethereum/go-ethereum/event"
-	"github.com/ethereum/go-ethereum/pow"
 	"github.com/ethereum/go-ethereum/rlp"
-	"github.com/ethereum/go-ethereum/state"
 )
 
 func init() {

+ 2 - 0
pow/block.go

@@ -7,4 +7,6 @@ type Block interface {
 	HashNoNonce() []byte
 	Nonce() []byte
 	Number() *big.Int
+	MixDigest() []byte
+	SeedHash() []byte
 }