func (n *NodeBlockchain) DropBlock() (*structures.Block, error) {
	return n.GetBCManager().DeleteBlock()
}
Drop block from a top of blockchain
package nodemanager
import (
	"errors"
	"github.com/gelembjuk/democoin/lib/utils"
	"github.com/gelembjuk/democoin/lib/wallet"
	"github.com/gelembjuk/democoin/node/blockchain"
	"github.com/gelembjuk/democoin/node/consensus"
	"github.com/gelembjuk/democoin/node/structures"
	"github.com/gelembjuk/democoin/node/transactions"
)
type NodeBlockchain struct {
	Logger        *utils.LoggerMan
	MinterAddress string
	DBConn        *Database
}
func (n *NodeBlockchain) GetBCManager() *blockchain.Blockchain {
	bcm, _ := blockchain.NewBlockchainManager(n.DBConn.DB(), n.Logger)
	return bcm
}
func (n *NodeBlockchain) getTransactionsManager() transactions.TransactionsManagerInterface {
	return transactions.NewManager(n.DBConn.DB(), n.Logger)
}
func (n *NodeBlockchain) CheckBlockExists(blockHash []byte) (bool, error) {
	return n.GetBCManager().CheckBlockExists(blockHash)
}
func (n *NodeBlockchain) GetBlock(hash []byte) (*structures.Block, error) {
	block, err := n.GetBCManager().GetBlock(hash)
	return &block, err
}
func (n *NodeBlockchain) GetBestHeight() (int, error) {
	bcm := n.GetBCManager()
	bestHeight, err := bcm.GetBestHeight()
	if err != nil {
		return 0, err
	}
	return bestHeight, nil
}
func (n *NodeBlockchain) GetTopBlockHash() ([]byte, error) {
	bcm := n.GetBCManager()
	topHash, _, err := bcm.GetState()
	if err != nil {
		return nil, err
	}
	return topHash, nil
}
func (n *NodeBlockchain) GetAddressHistory(address string) ([]structures.TransactionsHistory, error) {
	if address == "" {
		return nil, errors.New("Address is missed")
	}
	w := wallet.Wallet{}
	if !w.ValidateAddress(address) {
		return nil, errors.New("Address is not valid")
	}
	bci, err := blockchain.NewBlockchainIterator(n.DBConn.DB())
	if err != nil {
		return nil, err
	}
	pubKeyHash, _ := utils.AddresToPubKeyHash(address)
	return bci.GetAddressHistory(pubKeyHash, address)
}