fullnode

package
v1.0.0-release Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func SortBlockByHeight(log *ipfsLog.ZapEventLogger, waitingList []*block.Block) []*block.Block

SortBlockByHeight sorts the given list of blocks by their height in ascending order.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL