snapshotcreator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSnapshot

func CreateSnapshot(snapshotFileName string, genesisTokenAmount uint64, genesisSeedBytes []byte, nodesToPledge map[identity.ID]uint64) (err error)

CreateSnapshot creates a new snapshot. Genesis is defined by genesisTokenAmount and seedBytes, it is pledged to the empty nodeID. The amount to pledge to each node is defined by nodesToPledge map, the funds of each pledge is burned. pledge funds | Pledge | Funds | | ------ | ------------ | | empty | genesisSeed | | node1 | empty/burned | | node2 | empty/burned |

func CreateSnapshotForIntegrationTest

func CreateSnapshotForIntegrationTest(snapshotFileName string, genesisTokenAmount uint64, genesisSeedBytes []byte, genesisNodePledge []byte, nodesToPledge map[[32]byte]uint64) (err error)

CreateSnapshotForIntegrationTest creates a new snapshot. Genesis is defined by genesisTokenAmount and seedBytes, it is pledged to the node that is derived from the same seed. The amount to pledge to each node is defined by nodesToPledge map (seedBytes->amount), the funds of each pledge is sent to the same seed. | Pledge | Funds | | ----------- | ----------- | | genesisSeed | genesisSeed | | node1 | node1 | | node2 | node2 |

Types

This section is empty.

Jump to

Keyboard shortcuts

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