Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteAll()
- func DeleteAllLastClosedBlock()
- func DeleteClosedBlock(hash [32]byte)
- func DeleteClosedTx(transaction protocol.Transaction)
- func DeleteINVALIDOpenTx(transaction protocol.Transaction)
- func DeleteLastClosedBlock(hash [32]byte)
- func DeleteOpenBlock(hash [32]byte)
- func DeleteOpenTx(transaction protocol.Transaction)
- func GetAccTxPubKeys(accTxData [][32]byte) (accTxPubKeys [][32]byte)
- func GetAccount(hash [32]byte) (acc *protocol.Account, err error)
- func GetFundsTxPubKeys(fundsTxData [][32]byte) (fundsTxPubKeys [][32]byte)
- func GetRootAccount(hash [32]byte) (acc *protocol.Account, err error)
- func GetTxPubKeys(block *protocol.Block) (txPubKeys [][32]byte)
- func Init(dbname string, bootstrapIpport string)
- func InitLogger() *log.Logger
- func IsRootKey(hash [32]byte) bool
- func PrintMemPoolSize()
- func ReadAllClosedBlocks() (allClosedBlocks []*protocol.Block)
- func ReadAllOpenTxs() (allOpenTxs []protocol.Transaction)
- func ReadClosedBlock(hash [32]byte) (block *protocol.Block)
- func ReadClosedTx(hash [32]byte) (transaction protocol.Transaction)
- func ReadINVALIDOpenTx(hash [32]byte) (transaction protocol.Transaction)
- func ReadLastClosedBlock() (block *protocol.Block)
- func ReadOpenBlock(hash [32]byte) (block *protocol.Block)
- func ReadOpenTx(hash [32]byte) (transaction protocol.Transaction)
- func ReadReceivedBlockStash() (receivedBlocks []*protocol.Block)
- func TearDown()
- func WriteClosedBlock(block *protocol.Block) (err error)
- func WriteClosedTx(transaction protocol.Transaction) (err error)
- func WriteINVALIDOpenTx(transaction protocol.Transaction)
- func WriteLastClosedBlock(block *protocol.Block) (err error)
- func WriteOpenBlock(block *protocol.Block) (err error)
- func WriteOpenTx(transaction protocol.Transaction)
- func WriteToReceivedStash(block *protocol.Block)
Constants ¶
View Source
const (
ERROR_MSG = "Initiate storage aborted: "
)
Variables ¶
Functions ¶
func DeleteAllLastClosedBlock ¶
func DeleteAllLastClosedBlock()
func DeleteClosedBlock ¶
func DeleteClosedBlock(hash [32]byte)
func DeleteClosedTx ¶
func DeleteClosedTx(transaction protocol.Transaction)
func DeleteINVALIDOpenTx ¶
func DeleteINVALIDOpenTx(transaction protocol.Transaction)
func DeleteLastClosedBlock ¶
func DeleteLastClosedBlock(hash [32]byte)
func DeleteOpenBlock ¶
func DeleteOpenBlock(hash [32]byte)
There exist open/closed buckets and closed tx buckets for all types (open txs are in volatile storage)
func DeleteOpenTx ¶
func DeleteOpenTx(transaction protocol.Transaction)
func GetAccTxPubKeys ¶
Get all pubKey involved in AccTx
func GetAccount ¶
Needed by miner and p2p package
func GetFundsTxPubKeys ¶
Get all pubKey involved in FundsTx
func GetTxPubKeys ¶
Get all pubKeys involved in AccTx, FundsTx of a given block
func InitLogger ¶
func PrintMemPoolSize ¶
func PrintMemPoolSize()
func ReadAllClosedBlocks ¶
func ReadAllOpenTxs ¶
func ReadAllOpenTxs() (allOpenTxs []protocol.Transaction)
Needed for the miner to prepare a new block
func ReadClosedBlock ¶
func ReadClosedTx ¶
func ReadClosedTx(hash [32]byte) (transaction protocol.Transaction)
Personally I like it better to test (which tx type it is) here, and get returned the interface. Simplifies the code
func ReadINVALIDOpenTx ¶
func ReadINVALIDOpenTx(hash [32]byte) (transaction protocol.Transaction)
func ReadLastClosedBlock ¶
func ReadOpenBlock ¶
Always return nil if requested hash is not in the storage. This return value is then checked against by the caller
func ReadOpenTx ¶
func ReadOpenTx(hash [32]byte) (transaction protocol.Transaction)
func ReadReceivedBlockStash ¶
func WriteClosedBlock ¶
func WriteClosedTx ¶
func WriteClosedTx(transaction protocol.Transaction) (err error)
func WriteINVALIDOpenTx ¶
func WriteINVALIDOpenTx(transaction protocol.Transaction)
func WriteLastClosedBlock ¶
func WriteOpenBlock ¶
func WriteOpenTx ¶
func WriteOpenTx(transaction protocol.Transaction)
Changing the "tx" shortcut here and using "transaction" to distinguish between bolt's transactions
func WriteToReceivedStash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.