debug

package
v0.2011.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugStateTotalSupply            = *quantity.NewFromUint64(math.MaxInt64)
	DebugStateSrcGeneralBalance      = *quantity.NewFromUint64(math.MaxInt64 - 100)
	DebugStateSrcEscrowActiveBalance = *quantity.NewFromUint64(100)
	DebugStateSrcEscrowActiveShares  = *quantity.NewFromUint64(1000)

	DebugGenesisState = api.Genesis{
		Parameters: api.ConsensusParameters{
			DebondingInterval: 1,
			Thresholds: map[api.ThresholdKind]quantity.Quantity{
				api.KindEntity:            *quantity.NewFromUint64(1),
				api.KindNodeValidator:     *quantity.NewFromUint64(2),
				api.KindNodeCompute:       *quantity.NewFromUint64(3),
				api.KindNodeStorage:       *quantity.NewFromUint64(4),
				api.KindNodeKeyManager:    *quantity.NewFromUint64(5),
				api.KindRuntimeCompute:    *quantity.NewFromUint64(6),
				api.KindRuntimeKeyManager: *quantity.NewFromUint64(7),
			},
			Slashing: map[api.SlashReason]api.Slash{
				api.SlashDoubleSigning: {
					Amount:         *quantity.NewFromUint64(math.MaxInt64),
					FreezeInterval: 1,
				},
			},
			MinDelegationAmount:     *quantity.NewFromUint64(10),
			FeeSplitWeightVote:      *quantity.NewFromUint64(1),
			RewardFactorEpochSigned: *quantity.NewFromUint64(1),
		},
		TokenSymbol: "TEST",
		TotalSupply: DebugStateTotalSupply,
		Ledger: map[api.Address]*api.Account{
			DebugStateSrcAddress: {
				General: api.GeneralAccount{
					Balance: DebugStateSrcGeneralBalance,
				},
				Escrow: api.EscrowAccount{
					Active: api.SharePool{
						Balance:     DebugStateSrcEscrowActiveBalance,
						TotalShares: DebugStateSrcEscrowActiveShares,
					},
				},
			},
		},
		Delegations: map[api.Address]map[api.Address]*api.Delegation{
			DebugStateSrcAddress: {
				DebugStateSrcAddress: {
					Shares: DebugStateSrcEscrowActiveShares,
				},
			},
		},
	}

	DebugStateSrcSigner  = mustGenerateSigner()
	DebugStateSrcAddress = api.NewAddress(DebugStateSrcSigner.Public())

	DebugStateDestAddress = api.NewAddress(destSigner.Public())
)

Functions

func AddressFromString

func AddressFromString(s string) api.Address

Types

This section is empty.

Jump to

Keyboard shortcuts

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