Documentation
¶
Index ¶
- func AddBlockTransactionToRegistry(log *ipfsLog.ZapEventLogger, config *config.Config, b *block.Block) bool
- func AskForBlockchainRegistry(log *ipfsLog.ZapEventLogger, ctx context.Context, askBlockchain *pubsub.Topic, ...) ([]byte, string, error)
- func AskForMyFiles(log *ipfsLog.ZapEventLogger, ctx context.Context, askMyFiles *pubsub.Topic, ...) ([]byte, string, error)
- func DownloadMissingBlocks(log *ipfsLog.ZapEventLogger, ctx context.Context, ipfsAPI icore.CoreAPI, ...) (bool, []*block.Block, error)
- func PrevBlockStored(log *ipfsLog.ZapEventLogger, b *block.Block, db *blockchaindb.BlockchainDB) (bool, error)
- func ReceiveBlock(log *ipfsLog.ZapEventLogger, ctx context.Context, ...) (*block.Block, error)
- func SendBlocksRegistryToNetwork(log *ipfsLog.ZapEventLogger, ctx context.Context, config *config.Config, ...) bool
- func SendOwnersFiles(log *ipfsLog.ZapEventLogger, ctx context.Context, config *config.Config, ...) bool
- func SortBlockByHeight(log *ipfsLog.ZapEventLogger, waitingList []*block.Block) []*block.Block
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBlockTransactionToRegistry ¶
func AddBlockTransactionToRegistry(log *ipfsLog.ZapEventLogger, config *config.Config, b *block.Block) bool
AddBlockTransactionToRegistry adds the transactions of the given block to the indexing registry.
func AskForBlockchainRegistry ¶
func AskForBlockchainRegistry(log *ipfsLog.ZapEventLogger, ctx context.Context, askBlockchain *pubsub.Topic, recBlockchain *pubsub.Subscription) ([]byte, string, error)
AskForBlockchainRegistry sends a request for the blockchain registry over the network.
func AskForMyFiles ¶
func AskForMyFiles(log *ipfsLog.ZapEventLogger, ctx context.Context, askMyFiles *pubsub.Topic, recMyFiles *pubsub.Subscription, myPublicKey []byte) ([]byte, string, error)
AskForIndexingRegistry sends a request for the indexing registry over the network.
func DownloadMissingBlocks ¶
func DownloadMissingBlocks(log *ipfsLog.ZapEventLogger, ctx context.Context, ipfsAPI icore.CoreAPI, registryBytes []byte, db *blockchaindb.BlockchainDB) (bool, []*block.Block, error)
DownloadMissingBlocks attemps to download blocks that are missing in the local blockchain from IPFS.
func PrevBlockStored ¶
func PrevBlockStored(log *ipfsLog.ZapEventLogger, b *block.Block, db *blockchaindb.BlockchainDB) (bool, error)
PrevBlockStored checks if the previous block is stored in the db.
func ReceiveBlock ¶
func ReceiveBlock(log *ipfsLog.ZapEventLogger, ctx context.Context, subBlockAnnouncement *pubsub.Subscription) (*block.Block, error)
ReceiveBlock receives a block announcement message and deserializes it into a block.
func SendBlocksRegistryToNetwork ¶
func SendBlocksRegistryToNetwork(log *ipfsLog.ZapEventLogger, ctx context.Context, config *config.Config, network *pubsub.Topic) bool
SendBlocksRegistryToNetwork sends the registry of the blockchain to the network.
func SendOwnersFiles ¶
func SendOwnersFiles(log *ipfsLog.ZapEventLogger, ctx context.Context, config *config.Config, myPublicKey string, owner *pubsub.Topic) bool
SendOwnersFiles sends the files owned by a specific specific user (by his publicKey).
func SortBlockByHeight ¶
SortBlockByHeight sorts the given list of blocks by their height in ascending order.
Types ¶
This section is empty.