dev

package
v0.0.0-...-6b48cb7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//err code 1
	ErrEncodeSendMsgFail      = `{Code:1,Error:"encode send msg fail."}`
	ErrParamError             = `{Code:2,Error:"parameters error."}`
	ErrGetOtherNodesDataFail  = `{Code:3,Error:"NetWork Error,Get Data From Other Node Fail."}`
	ErrUnknownChType          = `{Code:4,Error:"unknown channel type."}`
	ErrGetChValueFail         = `{Code:5,Error:"get channel value fail."}`
	ErrNoFindWorker           = `{Code:7,Error:"can not find worker."}`
	ErrGetWorkerIdError       = `{Code:10,Error:"get worker id error."}`
	ErrGetPrexDataError       = `{Code:11,Error:"get msg prefix data error."}`
	ErrSendDataToGroupFail    = `{Code:15,Error:"send data to group fail."}`
	ErrInternalMsgFormatError = `{Code:16,Error:"msg data format error."}`
	ErrGetNoResFromGroupMem   = `{Code:17,Error:"no get any result from other group node."}`
	ErrGroupNotReady          = `{Code:23,Error:"the group is not ready.please try again."}`
	ErrGetGenPubkeyFail       = `{Code:24,Error:"get generate pubkey fail."}`
	ErrGetGenSaveDataFail     = `{Code:25,Error:"get generate save data fail."}`
	ErrCreateDbFail           = `{Code:26,Error:"create db fail."}`
	ErrDcrmSigWrongSize       = `{Code:28,Error:"wrong size for dcrm sig."}`
	ErrDcrmSigFail            = `{Code:29,Error:"dcrm sign fail."}`
	ErrInvalidDcrmAddr        = `{Code:30,Error:"invalid dcrm address."}`
	ErrGetC1Timeout           = `{Code:31,Error:"get C1 timeout."}`
	ErrGetEnodeByUIdFail      = `{Code:32,Error:"can not find proper enodes by uid."}`
	ErrGetD1Timeout           = `{Code:33,Error:"get D1 timeout."}`
	ErrGetSHARE1Timeout       = `{Code:34,Error:"get SHARE1 timeout."}`
	ErrGetAllSHARE1Fail       = `{Code:35,Error:"get all SHARE1 msg fail."}`
	ErrGetAllD1Fail           = `{Code:36,Error:"get all D1 msg fail."}`
	ErrVerifySHARE1Fail       = `{Code:37,Error:"verify SHARE1 fail."}`
	ErrGetAllC1Fail           = `{Code:38,Error:"get all C1 msg fail."}`
	ErrKeyGenVerifyCommitFail = `{Code:39,Error:"verify commit in keygenerate fail."}`
	ErrGetZKFACTPROOFTimeout  = `{Code:40,Error:""get ZKFACTPROOF timeout."}`
	ErrGetZKUPROOFTimeout     = `{Code:41,Error:""get ZKUPROOF timeout."}`
	ErrGetAllZKFACTPROOFFail  = `{Code:42,Error:"get all ZKFACTPROOF msg fail."}`
	ErrVerifyZKFACTPROOFFail  = `{Code:43,Error:"verify ZKFACTPROOF fail."}`
	ErrGetAllZKUPROOFFail     = `{Code:44,Error:"get all ZKUPROOF msg fail."}`
	ErrVerifyZKUPROOFFail     = `{Code:45,Error:"verify ZKUPROOF fail."}`
	ErrGetC11Timeout          = `{Code:46,Error:"get C11 timeout."}`
	ErrGetMTAZK1PROOFTimeout  = `{Code:47,Error:"get MTAZK1PROOF timeout."}`
	ErrGetKCTimeout           = `{Code:48,Error:"get KC timeout."}`
	ErrGetAllKCFail           = `{Code:49,Error:"get all KC msg fail."}`
	ErrGetAllMTAZK1PROOFFail  = `{Code:50,Error:"get all MTAZK1PROOF msg fail."}`
	ErrVerifyMTAZK1PROOFFail  = `{Code:51,Error:"verify MTAZK1PROOF fail.""}`
	ErrGetMKGTimeout          = `{Code:52,Error:"get MKG timeout."}`
	ErrGetAllMKGFail          = `{Code:53,Error:"get all MKG msg fail."}`
	ErrGetMKWTimeout          = `{Code:54,Error:"get MKW timeout."}`
	ErrGetAllMKWFail          = `{Code:55,Error:"get all MKW msg fail."}`
	ErrVerifyMKGFail          = `{Code:56,Error:"verify MKG fail.""}`
	ErrVerifyMKWFail          = `{Code:57,Error:"verify MKW fail.""}`
	ErrGetPaillierPrivKeyFail = `{Code:58,Error:"get paillier privkey fail.""}`
	ErrGetDELTA1Timeout       = `{Code:59,Error:"get DELTA1 timeout."}`
	ErrGetAllDELTA1Fail       = `{Code:60,Error:"get all DELTA1 msg fail."}`
	ErrGetD11Timeout          = `{Code:61,Error:"get D11 timeout."}`
	ErrGetAllD11Fail          = `{Code:62,Error:"get all D11 msg fail."}`
	ErrGetAllC11Fail          = `{Code:63,Error:"get all C11 msg fail."}`
	ErrSignVerifyCommitFail   = `{Code:64,Error:"verify commit in dcrm sign fail."}`
	ErrREqualZero             = `{Code:65,Error:"sign error: r equal zero."}`
	ErrGetS1Timeout           = `{Code:66,Error:"get S1 timeout."}`
	ErrGetAllS1Fail           = `{Code:67,Error:"get all S1 msg fail."}`
	ErrVerifySAllFail         = `{Code:68,Error:"verify SAll != m*G + r*PK in dcrm sign ec2."}`
	ErrGetSS1Timeout          = `{Code:69,Error:"get SS1 timeout."}`
	ErrGetAllSS1Fail          = `{Code:70,Error:"get all SS1 msg fail."}`
	ErrSEqualZero             = `{Code:71,Error:"sign error: s equal zero."}`
	ErrDcrmSignVerifyFail     = `{Code:72,Error:"dcrm sign verify fail."}`
)

dcrm erros

View Source
var (
	Sep     = "dcrmparm"
	SepSave = "dcrmsepsave"
	SepSg   = "dcrmmsg"
	SepDel  = "dcrmsepdel"

	PaillierKeyLength = 2048

	KeyFile string

	//callback
	GetGroup               func(string) (int, string)
	SendToGroupAllNodes    func(string, string) (string, error)
	GetSelfEnode           func() string
	BroadcastInGroupOthers func(string, string) (string, error)
	SendToPeer             func(string, string) error
	ParseNode              func(string) string

	PubKeyData       = make(chan KeyData, 1000)
	RpcReqQueueCache = make(chan RpcReq, RpcMaxQueue)
)
View Source
var (
	//rpc-req //dcrm node
	RpcMaxWorker = 2000
	RpcMaxQueue  = 10000
	RpcReqQueue  chan RpcReq

	Enode_cnts int
	NodeCnt    = 3
	ThresHold  = 3
)

//////////////////////dcrm///////////////////////////////

Functions

func CalcDelta

func CalcDelta(alpha1 []*big.Int, betaU1 []*big.Int, ch chan interface{}) *big.Int

func CalcSigma

func CalcSigma(uu1 []*big.Int, vU1 []*big.Int, ch chan interface{}) *big.Int

func CalcUs

func CalcUs(mMtA *big.Int, u1K *big.Int, r *big.Int, sigma1 *big.Int) *big.Int

func Calc_r

func Calc_r(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ug map[string][]*big.Int, deltaSum *big.Int, ch chan interface{}) (*big.Int, *big.Int)

func Calc_s

func Calc_s(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ss1s map[string]*big.Int, ch chan interface{}) *big.Int

func Call

func Call(msg interface{}, enode string)

func CommitRpcReq

func CommitRpcReq()

func Compress

func Compress(c []byte) (string, error)

//compress

func DcrmCall

func DcrmCall(msg interface{}, enode string) <-chan string

func DcrmCallRet

func DcrmCallRet(msg interface{}, enode string)

func Decode2

func Decode2(s string) (interface{}, error)

func DecryptCkGamma

func DecryptCkGamma(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, u1PaillierSk *lib.PrivateKey, mkg map[string]*big.Int, ch chan interface{}) []*big.Int

func DecryptCkW

func DecryptCkW(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, u1PaillierSk *lib.PrivateKey, mkw map[string]*big.Int, ch chan interface{}) []*big.Int

func DecryptMsg

func DecryptMsg(cm string) (string, error)

func DefaultDataDir

func DefaultDataDir() string

func DisMsg

func DisMsg(msg string)

msg: hash-enode:C1:X1:X2

func DoubleHash

func DoubleHash(id string, keytype string) *big.Int

commitment question 1,only use sha3-256

func ECDSAGenKeyCalcPrivKey

func ECDSAGenKeyCalcPrivKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, sstruct map[string]*lib.ShareStruct2, ids sortableIDSSlice) (*big.Int, bool)

func ECDSAGenKeyCalcPubKey

func ECDSAGenKeyCalcPubKey(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, udecom map[string]*lib.Commitment, ids sortableIDSSlice) (map[string][]*big.Int, bool)

func ECDSAGenKeyRoundFive

func ECDSAGenKeyRoundFive(msgprex string, ch chan interface{}, w *RpcReqWorker, u1 *big.Int) bool

func ECDSAGenKeyRoundFour

func ECDSAGenKeyRoundFour(msgprex string, ch chan interface{}, w *RpcReqWorker) (*lib.NtildeH1H2, bool)

func ECDSAGenKeyRoundOne

func ECDSAGenKeyRoundOne(msgprex string, ch chan interface{}, w *RpcReqWorker) (*big.Int, *lib.PolyStruct2, *lib.PolyGStruct2, *lib.Commitment, *lib.PublicKey, *lib.PrivateKey, bool)

func ECDSAGenKeyRoundThree

func ECDSAGenKeyRoundThree(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1PolyG *lib.PolyGStruct2, commitU1G *lib.Commitment, ids sortableIDSSlice) bool

func ECDSAGenKeyRoundTwo

func ECDSAGenKeyRoundTwo(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1Poly *lib.PolyStruct2, ids sortableIDSSlice) ([]*lib.ShareStruct2, bool)

func ECDSAGenKeySaveData

func ECDSAGenKeySaveData(cointype string, ids sortableIDSSlice, w *RpcReqWorker, ch chan interface{}, skU1 *big.Int, u1PaillierPk *lib.PublicKey, u1PaillierSk *lib.PrivateKey, cs []string, u1NtildeH1H2 *lib.NtildeH1H2) bool

func ECDSAGenKeyVerifyCommitment

func ECDSAGenKeyVerifyCommitment(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ds []string, commitU1G *lib.Commitment, ids sortableIDSSlice) ([]string, map[string]*lib.Commitment, bool)

func ECDSAGenKeyVerifyShareData

func ECDSAGenKeyVerifyShareData(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, u1PolyG *lib.PolyGStruct2, u1Shares []*lib.ShareStruct2, ids sortableIDSSlice) (map[string]*lib.ShareStruct2, []string, bool)

func ECDSAGenKeyVerifyZKU

func ECDSAGenKeyVerifyZKU(msgprex string, cointype string, ch chan interface{}, w *RpcReqWorker, ids sortableIDSSlice, ug map[string][]*big.Int) bool

func ECDSASignPaillierEncrypt

func ECDSASignPaillierEncrypt(cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, u1K *big.Int, ch chan interface{}) (map[string]*big.Int, map[string]*big.Int, map[string]*lib.PublicKey)

func ECDSASignRoundEight

func ECDSASignRoundEight(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, l1 *big.Int, rho1 *big.Int, w *RpcReqWorker, ch chan interface{}, commitBigVAB1 *lib.Commitment) (*lib.ZkABProof, []string)

func ECDSASignRoundEleven

func ECDSASignRoundEleven(msgprex string, cointype string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, us1 *big.Int) map[string]*big.Int

func ECDSASignRoundFive

func ECDSASignRoundFive(msgprex string, cointype string, delta1 *big.Int, idSign sortableIDSSlice, w *RpcReqWorker, ch chan interface{}) *big.Int

func ECDSASignRoundFour

func ECDSASignRoundFour(msgprex string, cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*lib.PublicKey, zkfactproof map[string]*lib.NtildeH1H2, u1Gamma *big.Int, w1 *big.Int, betaU1Star []*big.Int, vU1Star []*big.Int, ch chan interface{}) (map[string]*big.Int, map[string]*lib.MtAZK2Proof_nhh, map[string]*big.Int, map[string]*lib.MtAZK3Proof_nhh, bool)

func ECDSASignRoundNine

func ECDSASignRoundNine(msgprex string, cointype string, w *RpcReqWorker, idSign sortableIDSSlice, mMtA *big.Int, r *big.Int, pkx *big.Int, pky *big.Int, BigVx *big.Int, BigVy *big.Int, rho1 *big.Int, commitbigcom map[string]*lib.Commitment, l1 *big.Int, ch chan interface{}) ([]string, *lib.Commitment)

func ECDSASignRoundOne

func ECDSASignRoundOne(msgprex string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}) (*big.Int, *big.Int, *lib.Commitment)

func ECDSASignRoundSeven

func ECDSASignRoundSeven(msgprex string, r *big.Int, deltaGammaGy *big.Int, us1 *big.Int, w *RpcReqWorker, ch chan interface{}) (*lib.Commitment, []string, *big.Int, *big.Int)

func ECDSASignRoundSix

func ECDSASignRoundSix(msgprex string, u1Gamma *big.Int, commitU1GammaG *lib.Commitment, w *RpcReqWorker, ch chan interface{}) *lib.ZkUProof

func ECDSASignRoundTen

func ECDSASignRoundTen(msgprex string, commitBigUT1 *lib.Commitment, w *RpcReqWorker, ch chan interface{}) []string

func ECDSASignRoundThree

func ECDSASignRoundThree(msgprex string, cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, ukc map[string]*big.Int) bool

func ECDSASignRoundTwo

func ECDSASignRoundTwo(msgprex string, cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, u1K *big.Int, ukc2 map[string]*big.Int, ukc3 map[string]*lib.PublicKey) (map[string]*lib.MtAZK1Proof_nhh, map[string]*lib.NtildeH1H2)

func ECDSASignVerifyBigUTCommitment

func ECDSASignVerifyBigUTCommitment(cointype string, commitbiguts []string, commitbigutd11s []string, commitBigUT1 *lib.Commitment, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, commitbigcom map[string]*lib.Commitment) bool

func ECDSASignVerifyBigVAB

func ECDSASignVerifyBigVAB(cointype string, w *RpcReqWorker, commitbigvabs []string, zkabproofs []string, commitBigVAB1 *lib.Commitment, u1zkABProof *lib.ZkABProof, idSign sortableIDSSlice, r *big.Int, deltaGammaGy *big.Int, ch chan interface{}) (map[string]*lib.Commitment, *big.Int, *big.Int)

func ECDSASignVerifyCommitment

func ECDSASignVerifyCommitment(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, commitU1GammaG *lib.Commitment, u1GammaZKProof *lib.ZkUProof, ch chan interface{}) map[string][]*big.Int

func ECDSASignVerifyZKGammaW

func ECDSASignVerifyZKGammaW(cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ukc map[string]*big.Int, ukc3 map[string]*lib.PublicKey, zkfactproof map[string]*lib.NtildeH1H2, mkg map[string]*big.Int, mkg_mtazk2 map[string]*lib.MtAZK2Proof_nhh, mkw map[string]*big.Int, mkw_mtazk2 map[string]*lib.MtAZK3Proof_nhh, ch chan interface{}) bool

func ECDSASignVerifyZKNtilde

func ECDSASignVerifyZKNtilde(msgprex string, cointype string, save string, w *RpcReqWorker, idSign sortableIDSSlice, ch chan interface{}, ukc map[string]*big.Int, ukc3 map[string]*lib.PublicKey, zk1proof map[string]*lib.MtAZK1Proof_nhh, zkfactproof map[string]*lib.NtildeH1H2) bool

func Encode2

func Encode2(obj interface{}) (string, error)

func EncryptMsg

func EncryptMsg(msg string, enodeID string) (string, error)

func Find

func Find(l *list.List, msg string) bool

func GenRandomSafePrime

func GenRandomSafePrime(length int)

func GetChannelValue

func GetChannelValue(t int, obj interface{}) (string, error)

func GetDbDir

func GetDbDir() string

func GetEnodesByUid

func GetEnodesByUid(uid *big.Int, cointype string, groupid string) string

func GetEnodesInfo

func GetEnodesInfo()

func GetGroupDir

func GetGroupDir() string

func GetGroupIdByEnode

func GetGroupIdByEnode(enode string) string

func GetIds

func GetIds(cointype string, groupid string) sortableIDSSlice

func GetPaillierPk

func GetPaillierPk(save string, index int) *lib.PublicKey

func GetPaillierSk

func GetPaillierSk(save string, index int) *lib.PrivateKey

func GetRandomBetaV

func GetRandomBetaV(PaillierKeyLength int) ([]*big.Int, []*big.Int, []*big.Int, []*big.Int)

func GetRandomInt

func GetRandomInt(length int) *big.Int

func GetRandomIntFromZn

func GetRandomIntFromZn(n *big.Int) *big.Int

func GetRetErr

func GetRetErr(err string) error

func GetRetErrJsonStr

func GetRetErrJsonStr(code int, err string) string

func GetSelfPrivKey

func GetSelfPrivKey(cointype string, idSign sortableIDSSlice, w *RpcReqWorker, save string, ch chan interface{}) *lib.PrivateKey

func GetSignString

func GetSignString(r *big.Int, s *big.Int, v int32, i int) string

func GetZkFactProof

func GetZkFactProof(save string, index int) *lib.NtildeH1H2

paillier question 2,delete zkfactor,add ntilde h1 h2

func InitChan

func InitChan()

workers,RpcMaxWorker,RpcReqWorker,RpcReqQueue,RpcMaxQueue,ReqDispatcher

func InitDev

func InitDev(keyfile string, groupId string)

func IsCurNode

func IsCurNode(enodes string, cur string) bool

func IsInGroup

func IsInGroup(enode string, groupId string) bool

func KeyGenerate_ECDSA

func KeyGenerate_ECDSA(msgprex string, ch chan interface{}, id int, cointype string) bool

ec2 msgprex = hash

func MapPrivKeyShare

func MapPrivKeyShare(cointype string, w *RpcReqWorker, idSign sortableIDSSlice, privshare string) (*big.Int, *big.Int)

func PutGroup

func PutGroup(groupId string) bool

func ReadBits

func ReadBits(bigint *big.Int, buf []byte)

ReadBits encodes the absolute value of bigint as big-endian bytes. Callers must ensure that buf has enough space. If buf is too short the result will be incomplete.

func RegP2pBroadcastInGroupOthersCallBack

func RegP2pBroadcastInGroupOthersCallBack(f func(string, string) (string, error))

func RegP2pGetGroupCallBack

func RegP2pGetGroupCallBack(f func(string) (int, string))

func RegP2pGetSelfEnodeCallBack

func RegP2pGetSelfEnodeCallBack(f func() string)

func RegP2pParseNodeCallBack

func RegP2pParseNodeCallBack(f func(string) string)

func RegP2pSendMsgToPeerCallBack

func RegP2pSendMsgToPeerCallBack(f func(string, string) error)

func RegP2pSendToGroupAllNodesCallBack

func RegP2pSendToGroupAllNodesCallBack(f func(string, string) (string, error))

func SavePubKeyDataToDb

func SavePubKeyDataToDb()

func SendMsgToDcrmGroup

func SendMsgToDcrmGroup(msg string, groupid string)

func SendMsgToPeer

func SendMsgToPeer(enodes string, msg string)

func SendReqToGroup

func SendReqToGroup(msg string, rpctype string) (string, error)

func SetUpMsgList

func SetUpMsgList(msg string)

func Sign_ec2

func Sign_ec2(msgprex string, save string, message string, cointype string, pkx *big.Int, pky *big.Int, ch chan interface{}, id int) string

msgprex = hash return value is the backup for the dcrm sig

func Tool_DecimalByteSlice2HexString

func Tool_DecimalByteSlice2HexString(DecimalSlice []byte) string

func UnCompress

func UnCompress(s string) (string, error)

//uncompress

func Verify

func Verify(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool

func Verify2

func Verify2(r *big.Int, s *big.Int, v int32, message string, pkx *big.Int, pky *big.Int) bool

Types

type DcrmHash

type DcrmHash [32]byte

func Keccak256Hash

func Keccak256Hash(data ...[]byte) (h DcrmHash)

Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.

func (DcrmHash) Hex

func (h DcrmHash) Hex() string

type ECDSASignature

type ECDSASignature struct {
	// contains filtered or unexported fields
}

func (*ECDSASignature) GetR

func (this *ECDSASignature) GetR() *big.Int

func (*ECDSASignature) GetRecoveryParam

func (this *ECDSASignature) GetRecoveryParam() int32

func (*ECDSASignature) GetRoudFiveAborted

func (this *ECDSASignature) GetRoudFiveAborted() bool

func (*ECDSASignature) GetS

func (this *ECDSASignature) GetS() *big.Int

func (*ECDSASignature) New

func (this *ECDSASignature) New()

func (*ECDSASignature) New2

func (this *ECDSASignature) New2(r *big.Int, s *big.Int)

func (*ECDSASignature) New3

func (this *ECDSASignature) New3(r *big.Int, s *big.Int, recoveryParam int32)

func (*ECDSASignature) SetR

func (this *ECDSASignature) SetR(r *big.Int)

func (*ECDSASignature) SetRecoveryParam

func (this *ECDSASignature) SetRecoveryParam(recoveryParam int32)

func (*ECDSASignature) SetRoudFiveAborted

func (this *ECDSASignature) SetRoudFiveAborted(roudFiveAborted bool)

func (*ECDSASignature) SetS

func (this *ECDSASignature) SetS(s *big.Int)

type Err

type Err struct {
	Info string
}

error type 1

func (Err) Error

func (e Err) Error() string

type ErrorRet

type ErrorRet struct {
	Code  int
	Error string
}

type KeyData

type KeyData struct {
	Key  []byte
	Data string
}

type RecvMsg

type RecvMsg struct {
	// contains filtered or unexported fields
}

RecvMsg

func (*RecvMsg) Run

func (self *RecvMsg) Run(workid int, ch chan interface{}) bool

type ReqAddrSendMsgToDcrm

type ReqAddrSendMsgToDcrm struct {
	KeyType string
}

func (*ReqAddrSendMsgToDcrm) Run

func (self *ReqAddrSendMsgToDcrm) Run(workid int, ch chan interface{}) bool

type ReqDispatcher

type ReqDispatcher struct {
	// A pool of workers channels that are registered with the dispatcher
	WorkerPool chan chan RpcReq
}

rpc-req

func NewReqDispatcher

func NewReqDispatcher(maxWorkers int) *ReqDispatcher

func (*ReqDispatcher) Run

func (d *ReqDispatcher) Run()

type RpcDcrmRes

type RpcDcrmRes struct {
	Ret string
	Err error
}

func GetGroupRes

func GetGroupRes(wid int) RpcDcrmRes

type RpcReq

type RpcReq struct {
	// contains filtered or unexported fields
}

type RpcReqWorker

type RpcReqWorker struct {
	RpcReqWorkerPool chan chan RpcReq
	RpcReqChannel    chan RpcReq
	// contains filtered or unexported fields
}

func FindWorker

func FindWorker(sid string) (*RpcReqWorker, error)

func NewRpcReqWorker

func NewRpcReqWorker(workerPool chan chan RpcReq) *RpcReqWorker

func (*RpcReqWorker) Clear

func (w *RpcReqWorker) Clear()

func (*RpcReqWorker) Start

func (w *RpcReqWorker) Start()

func (*RpcReqWorker) Stop

func (w *RpcReqWorker) Stop()

type SendMsg

type SendMsg struct {
	MsgType string
	Nonce   string
	WorkId  int
	Msg     string
}

type SignSendMsgToDcrm

type SignSendMsgToDcrm struct {
	PubKey  string
	KeyType string
	Message string
}

func (*SignSendMsgToDcrm) Run

func (self *SignSendMsgToDcrm) Run(workid int, ch chan interface{}) bool

type WorkReq

type WorkReq interface {
	Run(workid int, ch chan interface{}) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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