utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const TrustingPeriodFraction = 2

TrustingPeriodFraction is used to compute the IBC clients TrustingPeriod as UnbondingPeriod / TrustingPeriodFraction

Variables

This section is empty.

Functions

func AccumulateChanges

func AccumulateChanges(currentChanges, newChanges []abci.ValidatorUpdate) []abci.ValidatorUpdate

func ComputeConsumerUnbondingPeriod

func ComputeConsumerUnbondingPeriod(providerUnbondingPeriod time.Duration) time.Duration

ComputeConsumerUnbondingPeriod computes the unbonding period on the consumer from the unbonding period on the provider (providerUnbondingPeriod). In general, the consumer unbonding period should be a bit smaller (e.g., one day) than the provider unbonding period so that it covers the delays of relaying IBC packets. As a result, delegators on the provider would not have to wait longer to unbond their tokens.

func GetChangePubKeyAddress

func GetChangePubKeyAddress(change abci.ValidatorUpdate) (addr []byte)

func OnRecvPacketOnUnknownChannel

func OnRecvPacketOnUnknownChannel(
	ctx sdk.Context,
	scopedKeeper capabilitykeeper.ScopedKeeper,
	channelKeeper ccv.ChannelKeeper,
	packet channeltypes.Packet,
) exported.Acknowledgement

OnRecvPacketOnUnknownChannel handles a received packet that was sent not on an established CCV channel

func SendIBCPacket

func SendIBCPacket(
	ctx sdk.Context,
	scopedKeeper capabilitykeeper.ScopedKeeper,
	channelKeeper ccv.ChannelKeeper,
	channelID string,
	portID string,
	packetData []byte,
) error

SendIBCPacket sends an IBC packet with packetData over the source channelID and portID

Types

This section is empty.

Jump to

Keyboard shortcuts

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