mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-28 23:27:36 +00:00
19a430b262
* Adds basic RPC supporting files * Adds interrupt handling and error chan * Add getblock RPC method * Update request structure * Update names of nodes * Allow bad addresses to be registered in discovery externally * Small tidy up * Few tweaks * Check if error is close error in tcp transport * Fix tests * Fix priv port * Small tweak to param name * Comment fix * Remove version from server * Moves submitblock to TODO block * Remove old field * Bumps version and fix hex issues
18 lines
489 B
Go
18 lines
489 B
Go
package core
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/util"
|
|
|
|
// Blockchainer is an interface that abstract the implementation
|
|
// of the blockchain.
|
|
type Blockchainer interface {
|
|
AddHeaders(...*Header) error
|
|
AddBlock(*Block) error
|
|
BlockHeight() uint32
|
|
HeaderHeight() uint32
|
|
GetBlock(hash util.Uint256) (*Block, error)
|
|
GetHeaderHash(int) util.Uint256
|
|
CurrentHeaderHash() util.Uint256
|
|
CurrentBlockHash() util.Uint256
|
|
HasBlock(util.Uint256) bool
|
|
HasTransaction(util.Uint256) bool
|
|
}
|