Merge pull request #601 from nspcc-dev/refactoring/core
core: refactor out Block, BlockBase and Header, closes #597.
This commit is contained in:
commit
32213b1454
36 changed files with 327 additions and 232 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
|
||||
"github.com/CityOfZion/neo-go/config"
|
||||
"github.com/CityOfZion/neo-go/pkg/core"
|
||||
coreb "github.com/CityOfZion/neo-go/pkg/core/block"
|
||||
"github.com/CityOfZion/neo-go/pkg/core/transaction"
|
||||
"github.com/CityOfZion/neo-go/pkg/crypto/hash"
|
||||
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
|
||||
|
@ -69,7 +70,7 @@ type Config struct {
|
|||
Broadcast func(p *Payload)
|
||||
// RelayBlock is a callback that is called to notify server
|
||||
// about the new block that needs to be broadcasted.
|
||||
RelayBlock func(b *core.Block)
|
||||
RelayBlock func(b *coreb.Block)
|
||||
// Chain is a core.Blockchainer instance.
|
||||
Chain core.Blockchainer
|
||||
// RequestTx is a callback to which will be called
|
||||
|
@ -302,7 +303,7 @@ func (s *service) processBlock(b block.Block) {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *service) getBlockWitness(b *core.Block) *transaction.Witness {
|
||||
func (s *service) getBlockWitness(b *coreb.Block) *transaction.Witness {
|
||||
dctx := s.dbft.Context
|
||||
pubs := convertKeys(dctx.Validators)
|
||||
sigs := make(map[*keys.PublicKey][]byte)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue