validatorGroup

package
v0.0.0-...-ddf2b42 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidatorGroupAbi, Abierr          = abi.JSON(strings.NewReader(validatorGroupJson))
	ValidatorGroupContractAbi, Abi1err = abi.JSON(strings.NewReader(validatorGroupContractJson))
)

Functions

func EnlargeSlice

func EnlargeSlice(val reflect.Value, newLen int)

func Find

func Find(slice SortedSliceInterface, data interface{}) (int, bool)

func Insert

func Insert(slice SortedSliceInterface, data interface{})

func Remove

func Remove(slice SortedSliceInterface, data interface{}) bool

Types

type AddressSlice

type AddressSlice []common.Address

func (*AddressSlice) Find

func (ad *AddressSlice) Find(address common.Address) (int, bool)

func (AddressSlice) Greater

func (ad AddressSlice) Greater(i int, b interface{}) bool

func (*AddressSlice) Insert

func (ad *AddressSlice) Insert(address common.Address)

func (AddressSlice) Less

func (ad AddressSlice) Less(i int, b interface{}) bool

func (*AddressSlice) Remove

func (ad *AddressSlice) Remove(address common.Address) bool

type CurrentData

type CurrentData struct {
	Amount       *big.Int
	PreAmount    *big.Int
	Interest     *big.Int
	WithdrawList []common.WithDrawInfo
}

type DepositPos

type DepositPos struct {
	DType    uint64
	Position uint64
	Amount   *big.Int `rlp:"-"`
	EndTime  uint64   `rlp:"-"`
}

Participants Deposit info

type SortedSliceInterface

type SortedSliceInterface interface {
	Greater(i int, b interface{}) bool
	Less(i int, b interface{}) bool
}

type ValidatorInfo

type ValidatorInfo struct {
	Address   common.Address
	Reward    *big.Int
	AllAmount *big.Int `rlp:"-"`
	Current   CurrentData
	Positions []DepositPos
}

func NewValidatorInfo

func NewValidatorInfo(address common.Address) *ValidatorInfo

type ValidatorInfoSlice

type ValidatorInfoSlice []ValidatorInfo

func (*ValidatorInfoSlice) Find

func (ad *ValidatorInfoSlice) Find(address common.Address) (int, bool)

func (ValidatorInfoSlice) Greater

func (ad ValidatorInfoSlice) Greater(i int, b interface{}) bool

func (*ValidatorInfoSlice) Insert

func (ad *ValidatorInfoSlice) Insert(info ValidatorInfo)

func (ValidatorInfoSlice) Less

func (ad ValidatorInfoSlice) Less(i int, b interface{}) bool

func (*ValidatorInfoSlice) Remove

func (ad *ValidatorInfoSlice) Remove(address common.Address) bool

Jump to

Keyboard shortcuts

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