dht_permission_layers

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: GPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpFilenames = permLayer.SpFilenames

Functions

func BCAddressToEthAddress

func BCAddressToEthAddress(address BCAddress) [20]byte

func CompareHexOrDec

func CompareHexOrDec(lhs, rhs string) (int, error)

func NewPermissionLayer

func NewPermissionLayer(sid string) permLayer.PermissionLayer

func ValidateBootstrapPeersETH

func ValidateBootstrapPeersETH(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (val, notval []peer.AddrInfo, err error)

func ValidateBootstrapPeersNEO

func ValidateBootstrapPeersNEO(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (val, notval []peer.AddrInfo, err error)

func ValidatePeerIDETH

func ValidatePeerIDETH(bootstrapPeer peer.ID) (ret bool, err error)

ETH

func ValidatePeerIDNEO

func ValidatePeerIDNEO(bootstrapPeer peer.ID) (ret bool, err error)

Types

type BCAddress

type BCAddress string

func EthAddressToBCAddress

func EthAddressToBCAddress(address [20]byte) BCAddress

type Ethereum

type Ethereum struct {
}

func (Ethereum) CompareBlockHeights

func (e Ethereum) CompareBlockHeights(lhs, rhs permLayer.VersionData) (int, error)

func (Ethereum) GetBlockHash

func (e Ethereum) GetBlockHash(blockHeight string) (string, error)

func (Ethereum) GetBlockHeight

func (e Ethereum) GetBlockHeight() (string, error)

func (Ethereum) ID

func (Ethereum) IsInPeerstoreMap

func (e Ethereum) IsInPeerstoreMap(tocheckPeers []peer.AddrInfo) (isIn, notIn []peer.AddrInfo)

func (Ethereum) NewVersionData

func (e Ethereum) NewVersionData() (*permLayer.VersionData, error)

func (Ethereum) Permissioned

func (e Ethereum) Permissioned() bool

func (Ethereum) PutInPeerstoreMap

func (e Ethereum) PutInPeerstoreMap(validated, notValidated []peer.AddrInfo)

func (Ethereum) UpdateIndividualSPProfileCache

func (e Ethereum) UpdateIndividualSPProfileCache(pid peer.ID)

func (Ethereum) UpdateSPProfileCache

func (e Ethereum) UpdateSPProfileCache(pids []peer.ID)

func (Ethereum) ValidatePeer

func (e Ethereum) ValidatePeer(pid peer.ID, timeout time.Duration) (bool, error)

func (Ethereum) ValidatePeers

func (e Ethereum) ValidatePeers(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (res []peer.AddrInfo, err error)

func (Ethereum) ValidatePeersPtrArr

func (e Ethereum) ValidatePeersPtrArr(bootstrapPeers []*peer.AddrInfo, timeout time.Duration) (res []*peer.AddrInfo, err error)

type Neo

type Neo struct {
}

func (Neo) CompareBlockHeights

func (n Neo) CompareBlockHeights(lhs, rhs permLayer.VersionData) (int, error)

func (Neo) GetBlockHash

func (n Neo) GetBlockHash(blockHeight string) (string, error)

func (Neo) GetBlockHeight

func (n Neo) GetBlockHeight() (string, error)

func (Neo) ID

func (Neo) IsInPeerstoreMap

func (n Neo) IsInPeerstoreMap(tocheckPeers []peer.AddrInfo) (isIn, notIn []peer.AddrInfo)

func (Neo) NewVersionData

func (n Neo) NewVersionData() (v *permLayer.VersionData, err error)

func (Neo) Permissioned

func (n Neo) Permissioned() bool

func (Neo) PutInPeerstoreMap

func (n Neo) PutInPeerstoreMap(validated, notValidated []peer.AddrInfo)

func (Neo) UpdateIndividualSPProfileCache

func (n Neo) UpdateIndividualSPProfileCache(pid peer.ID)

func (Neo) UpdateSPProfileCache

func (n Neo) UpdateSPProfileCache(pids []peer.ID)

func (Neo) ValidatePeer

func (n Neo) ValidatePeer(pid peer.ID, timeout time.Duration) (bool, error)

func (Neo) ValidatePeers

func (n Neo) ValidatePeers(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (res []peer.AddrInfo, err error)

func (Neo) ValidatePeersPtrArr

func (n Neo) ValidatePeersPtrArr(bootstrapPeers []*peer.AddrInfo, timeout time.Duration) (res []*peer.AddrInfo, err error)

type NonPermissioned

type NonPermissioned struct {
}

NONPERMISSIONED

func (NonPermissioned) CompareBlockHeights

func (n NonPermissioned) CompareBlockHeights(lhs, rhs permLayer.VersionData) (int, error)

func (NonPermissioned) GetBlockHash

func (n NonPermissioned) GetBlockHash(blockHeight string) (string, error)

func (NonPermissioned) GetBlockHeight

func (n NonPermissioned) GetBlockHeight() (string, error)

func (NonPermissioned) ID

func (NonPermissioned) NewVersionData

func (n NonPermissioned) NewVersionData() (*permLayer.VersionData, error)

func (NonPermissioned) Permissioned

func (n NonPermissioned) Permissioned() bool

func (NonPermissioned) UpdateIndividualSPProfileCache

func (n NonPermissioned) UpdateIndividualSPProfileCache(pid peer.ID)

func (NonPermissioned) UpdateSPProfileCache

func (n NonPermissioned) UpdateSPProfileCache(pids []peer.ID)

func (NonPermissioned) ValidatePeer

func (n NonPermissioned) ValidatePeer(pid peer.ID, timout time.Duration) (bool, error)

func (NonPermissioned) ValidatePeers

func (n NonPermissioned) ValidatePeers(bootstrapPeers []peer.AddrInfo, timeout time.Duration) (res []peer.AddrInfo, err error)

func (NonPermissioned) ValidatePeersPtrArr

func (n NonPermissioned) ValidatePeersPtrArr(bootstrapPeers []*peer.AddrInfo, timeout time.Duration) (res []*peer.AddrInfo, err error)

type VersionData

type VersionData permLayer.VersionData

Jump to

Keyboard shortcuts

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