Documentation ¶
Index ¶
- Variables
- func AllIndexing(cubeno int) map[string]string
- func AllStatistic(cubeno int) map[string]string
- func AllStatisticToStr(addr string) string
- func BlockHash(str string) string
- func BlockName(idx int, cno int) string
- func BlockRead(index int, cubeno int, object interface{}) error
- func BlockSpecialData(BlockData []byte) map[string]string
- func ByteToStr(bytes []byte) string
- func CallHash(str string, hno int) string
- func ClientRun(req *Request) int
- func ClientRunFlag()
- func CubeBalance(addr string, cubeno int) float64
- func CubeDownload(cubeno int) string
- func CubeDownloadFile(cubeno int)
- func CubeDownloadFrom(cubeno int, ip string, hash string) string
- func CubeDownloadRpcFrom(cubeno int, ip string) string
- func CubeFileName(idx int) string
- func CubeHeight() int
- func CubeIndexToStr(ci CubeIndex) string
- func CubeIndexing(cubeno int) map[string]string
- func CubeIndexing00(cubeno int) map[string]string
- func CubeOnlyStatistic(cubeno int) map[string]string
- func CubePath(idx int) string
- func CubePathNum(path string) int
- func CubeRead(index int, object *Cube) error
- func CubeStatistic(cubeno int) map[string]string
- func CubeStatistic00(cubeno int) map[string]string
- func CubeStatistic01(cubeno int) map[string]string
- func CubeStatisticToStr(addr string) string
- func CubeStatistic_pp00(cubeno int) [4][]string
- func CubeSync() bool
- func CubenoSet()
- func CubingFileName(idx int) string
- func CubingFileWrite(cubing Cubing) error
- func CubingHash(str string) string
- func CurrentHeight() int
- func DirExist(dirName string) bool
- func DownloadFile(filepath string, url string) (string, error)
- func DownloadFileWithName(filepath string, url string, filename string) (string, error)
- func DownloadRpc(cubeno int, url string) (string, error)
- func Err(err error, exit int) int
- func FilePath(idx int) string
- func FileRead(path string, object interface{}) error
- func FileReadString(path string) string
- func FileSearch(dirname string, find string) string
- func FileSize(dirpath string) int64
- func FileWrite(path string, object interface{}) error
- func GeTxData(txhash string, symbol string) (TxData, CubeIndex)
- func GenCubeTx(cubeno int, blockno int) string
- func GenesisTx(blockno int) string
- func GetBalance(addr string) float64
- func GetBalanceRS(addr string, rs string) float64
- func GetBlock(cubeno int, blockno int) string
- func GetBlockAll(cubeno int) string
- func GetBlockBase(cubeno int, blockno int) string
- func GetBlockTx(cubeno int, blockno int) string
- func GetBlockTxHash(cubeno int, blockno int, addr string, u_addr string, coin float64) string
- func GetBlockTxSearch(cubeno int, blockno int, addr string, u_addr string, coin float64) string
- func GetBytes(key interface{}) []byte
- func GetCube(cubeno int) string
- func GetCubeBase(cubeno int) string
- func GetCubeHeight() string
- func GetCubeHeight2() string
- func GetCubeHeight3() string
- func GetCubePoh(cubeno int) (TxData, TxData)
- func GetCubeTx(cubeno int) string
- func GetIndexing() string
- func GetIndexingAddr(addr string) string
- func GetIssue() string
- func GetPattenHash(cubeno int, blockno int) string
- func GetPattenHash0(cubeno int, blockno int) string
- func GetRequestVars(m map[string]string, key string) string
- func GetStaticData(cubeno int, aStatistic map[string]StatisticData) map[string]StatisticData
- func GetStaticValue(addr string) (float64, float64, int)
- func GetStaticVar(addr string) (float64, float64, float64, float64, int, int, int)
- func GetStaticVarCube(addr string, cubeno int) (float64, float64, int, int)
- func GetStatistic() string
- func GetStatisticAddr(addr string) string
- func GetStatisticRank(item string, item2 string, count int) string
- func GetStatisticValue(item string, addr string, aStatistic *TxStatistic) string
- func GetTkCount(addr string) int
- func GetTransactionCount(addr string) int
- func GetTransactionData(txhash string) (TxData, CubeIndex)
- func GetTransactionDetail(txhash string) (TxData, CubeIndex)
- func GetTransactionList(addr string) string
- func GetTxCount(addr string) int
- func GetTxDetail(txhash string, symbol string) (TxData, CubeIndex)
- func GetTxList(addr string, symbol string) string
- func GetTxListDetail(addr string) string
- func HttpServer()
- func IndexingAddr(addr string) (int, string)
- func IndexingRead(aIndexing *TxIndexing)
- func IpCheck() []string
- func MakeDir(idx int) string
- func MakePath(dirname string) string
- func MakeStat(filepath string)
- func MaxFind(dirpath string) string
- func MerkleElement(a, b string) string
- func MerkleHash(elements []string) string
- func NodeCube(cmode string, data string) string
- func NodeSend(cmode string, data string) string
- func NodeSend2(cmode string, data string) string
- func PHashVerify(hash string) bool
- func PathDelete(path string) error
- func PatternHash(str string, cno int) string
- func PowBlockHashing(pstr string, max int) (string, int)
- func PowCubeHashing(pstr string, max int) (string, int)
- func PowSpecialHashing(pstr string, max int) (string, int)
- func ReadBlockHash(index int, cubeno int) string
- func ReadBlockPHash(index int, cubeno int) string
- func RpcServer()
- func Serialize(object interface{}) []byte
- func ServerRun()
- func SpecialSync()
- func SpecialTx(blockno int) string
- func StatisticRead(aStatistic *TxStatistic)
- func StatisticToStr(addr string, cubeno int) string
- func StatisticToStrCube(addr string, cubeno int) string
- func StrToByte(str string) []byte
- func Sync()
- func SyncDownload(idx int)
- func SyncOne()
- func TreePrint()
- func TreeToSpecial(tbst TxBST) map[string]string
- func TxBlock(cubeno int, blockno int) (TxBST, MineResult)
- func TxPool(cubeno int, blockno int) string
- func TxScanResult(addr string, ci CubeIndex) bool
- func TxpoolToBst(cubeno int, blockno int, TxStr string) (TxBST, MineResult)
- func TxpoolToBst00(TxStr string) (TxBST, MineResult)
- func TxpoolToGenesis(TxStr string) (TxBST, MineResult)
- func TxpoolToSpecial(cubeno int, blockno int) (TxBST, MineResult)
- func TxpoolToTr(TxStr string, blockno int) (TxBST, MineResult)
- func WriteJSON(w http.ResponseWriter, v interface{}) error
- type BST
- type BSTNode
- type BaseConf
- type Block
- func (block *Block) BlockString() string
- func (block *Block) BlockTxString() string
- func (block *Block) Broadcast() bool
- func (block *Block) FileInfo()
- func (block *Block) FileName() string
- func (block *Block) FilePath() string
- func (block *Block) FileSize() int64
- func (block *Block) GetHash() string
- func (block *Block) GetPatternHash() string
- func (block *Block) GetPrevHash() string
- func (block *Block) GetPrevHash0() string
- func (block *Block) HashString() string
- func (block *Block) Input(cubeno int, blockno int)
- func (block *Block) InputString(Str string)
- func (block *Block) MineBroadcast() bool
- func (block *Block) MineDataString() string
- func (block *Block) MineString() string
- func (block *Block) Mining()
- func (block *Block) PoolMining()
- func (block *Block) PosMining()
- func (block *Block) PowMining()
- func (block *Block) Print()
- func (block *Block) Read() error
- func (block *Block) Save() error
- func (block *Block) SetData()
- func (block *Block) SetHash()
- func (block *Block) SetPatternHash()
- func (block *Block) SetPrevHash()
- func (block *Block) String() string
- func (block *Block) ToStamp() string
- func (block *Block) Verify() bool
- type CMineResult
- type Cube
- func (cube *Cube) Balance(addr string) float64
- func (cube *Cube) Broadcast() bool
- func (cube *Cube) CubeString() string
- func (cube *Cube) Download() error
- func (cube *Cube) Downloading() error
- func (cube *Cube) FileBroadcast() error
- func (cube *Cube) FileBroadcast2()
- func (cube *Cube) FileInfo()
- func (cube *Cube) FileName() string
- func (cube *Cube) FilePath() string
- func (cube *Cube) FileSize() int64
- func (cube *Cube) GetHash() string
- func (cube *Cube) GetPrevHash() string
- func (cube *Cube) GetPrevHash0() string
- func (cube *Cube) HashString() string
- func (cube *Cube) Input(cubeno int)
- func (cube *Cube) InputChanel(cubeno int)
- func (cube *Cube) MineBroadcast() bool
- func (cube *Cube) MineString() string
- func (cube *Cube) Mining()
- func (cube *Cube) PosMining()
- func (cube *Cube) PowMining()
- func (cube *Cube) Print()
- func (cube *Cube) Read() error
- func (cube *Cube) Save() error
- func (cube *Cube) SetCubing(cubing *Cubing)
- func (cube *Cube) SetHash()
- func (cube *Cube) SetPrevHash()
- func (cube *Cube) String() string
- func (cube *Cube) TxCount(addr string) (int, int)
- func (cube *Cube) Verify() bool
- type CubeIndex
- type Cubing
- type EBlock
- type EscrowData
- type IBlock
- type IndexType
- type MineResult
- type NodeConf
- type OpenRule
- type Pair
- type PairFloat
- type PairFloatList
- type PairList
- type PeerConf
- type Pohr
- type PoolMining
- type PowConf
- type Request
- type ResResult
- type Response
- type RpcFunc
- type SBlock
- type StaticRule1
- type StatisticData
- type TxBST
- type TxData
- func BlockScanHash(txhash string, ci CubeIndex, datatype string) (TxData, int)
- func BlockTxData(BlockData []byte) []TxData
- func ByteToTx(data []byte) TxData
- func CubeScan(addr string, idx int) TxData
- func CubeScanHash(txhash string, idx int, datatype string) (TxData, int)
- func Deserialize(data []byte) []TxData
- func PowTx() TxData
- func TdDeserialize(data []byte) TxData
- func TreeToData(tbst TxBST) []TxData
- func TxDeserialize(data []byte) TxData
- func TxScan(addr string, ci CubeIndex) TxData
- func TxScanArr(addr string, ci CubeIndex) []TxData
- func (td *TxData) BtyeString() string
- func (td *TxData) GetCount() int
- func (td *TxData) GetHash() string
- func (td *TxData) GetHash00() string
- func (td *TxData) HashString() string
- func (td *TxData) Input(TxStr string)
- func (td *TxData) Print()
- func (td *TxData) SetHash()
- func (td *TxData) String() string
- func (td *TxData) ToByte() []byte
- func (td *TxData) Transaction() string
- func (td *TxData) TxString() string
- func (td *TxData) Verify() bool
- type TxIndexing
- type TxStatistic
- type TxStatistics
Constants ¶
This section is empty.
Variables ¶
View Source
var AddrStatistics map[string]StatisticData
View Source
var BlockDelim = "||"
View Source
var CNO = 1
View Source
var Configure config.Configuration
View Source
var CubeDelim = "|||"
View Source
var CubeSetNum [27]string
View Source
var DebugMode = false
View Source
var GenBlock [27]string
View Source
var GenFile string
View Source
var MineCubeno = 0
View Source
var MineDifficulty = "0000ffff"
View Source
var MineDifficultyBase = "0000ffff"
View Source
var Pratio = Pohr{4.566, 4.566, 4.566, 127.855, 54.795}
View Source
var Pratio1 = Pohr{4.566, 4.566, 4.566, 127.855, 54.795}
View Source
var Pratio10 = Pohr{0, 0, 0, 0, 182.650}
View Source
var Pratio2 = Pohr{3.913, 3.913, 3.913, 109.590, 73.060}
View Source
var Pratio3 = Pohr{3.261, 3.261, 3.261, 91.325, 91.325}
View Source
var Pratio4 = Pohr{2.609, 2.609, 2.609, 73.060, 109.590}
View Source
var Pratio5 = Pohr{1.956, 1.956, 1.956, 54.795, 127.855}
View Source
var Pratio6 = Pohr{1.304, 1.304, 1.304, 36.530, 146.120}
View Source
var Pratio7 = Pohr{0.652, 0.652, 0.652, 18.265, 164.385}
View Source
var Pratio8 = Pohr{0, 0, 0, 0, 182.650}
View Source
var Pratio9 = Pohr{0, 0, 0, 0, 182.650}
View Source
var Sumfee = 0.0
View Source
var Tkcnt = 0
View Source
var TxDelim = "|"
View Source
var TxMerkleHash string
View Source
var TxMine string
View Source
var Txamount = 0.0
View Source
var Txcnt = 0
View Source
var Version = "1.01"
Functions ¶
func AllIndexing ¶
func AllStatistic ¶
func AllStatisticToStr ¶
func BlockSpecialData ¶
func ClientRunFlag ¶
func ClientRunFlag()
func CubeBalance ¶
func CubeDownload ¶
func CubeDownloadFile ¶
func CubeDownloadFile(cubeno int)
func CubeDownloadRpcFrom ¶
func CubeFileName ¶
func CubeHeight ¶
func CubeHeight() int
func CubeIndexToStr ¶
func CubeIndexing ¶
func CubeIndexing00 ¶
func CubeOnlyStatistic ¶
func CubePathNum ¶
func CubeStatistic ¶
func CubeStatistic00 ¶
func CubeStatistic01 ¶
func CubeStatisticToStr ¶
func CubeStatistic_pp00 ¶
func CubingFileName ¶
func CubingFileWrite ¶
func CubingHash ¶
func CurrentHeight ¶
func CurrentHeight() int
func DownloadFileWithName ¶
func FileReadString ¶
func FileSearch ¶
func GetBalance ¶
func GetBalanceRS ¶
func GetBlockAll ¶
func GetBlockBase ¶
func GetBlockTx ¶
func GetBlockTxHash ¶
func GetBlockTxSearch ¶
func GetCubeBase ¶
func GetCubeHeight ¶
func GetCubeHeight() string
func GetCubeHeight2 ¶
func GetCubeHeight2() string
func GetCubeHeight3 ¶
func GetCubeHeight3() string
func GetCubePoh ¶
func GetIndexing ¶
func GetIndexing() string
func GetIndexingAddr ¶
func GetPattenHash ¶
func GetPattenHash0 ¶
func GetStaticData ¶
func GetStaticData(cubeno int, aStatistic map[string]StatisticData) map[string]StatisticData
func GetStaticVar ¶
func GetStatistic ¶
func GetStatistic() string
func GetStatisticAddr ¶
func GetStatisticValue ¶
func GetStatisticValue(item string, addr string, aStatistic *TxStatistic) string
func GetTkCount ¶
func GetTransactionCount ¶
func GetTransactionData ¶
func GetTransactionDetail ¶
func GetTransactionList ¶
func GetTxCount ¶
func GetTxListDetail ¶
func HttpServer ¶
func HttpServer()
func IndexingAddr ¶
func IndexingRead ¶
func IndexingRead(aIndexing *TxIndexing)
func MerkleElement ¶
func MerkleHash ¶
func PHashVerify ¶
func PathDelete ¶
func PatternHash ¶
func ReadBlockHash ¶
func ReadBlockPHash ¶
func SpecialSync ¶
func SpecialSync()
func StatisticRead ¶
func StatisticRead(aStatistic *TxStatistic)
func StatisticToStr ¶
func StatisticToStrCube ¶
func SyncDownload ¶
func SyncDownload(idx int)
func TreeToSpecial ¶
func TxScanResult ¶
func TxpoolToBst ¶
func TxpoolToBst(cubeno int, blockno int, TxStr string) (TxBST, MineResult)
func TxpoolToBst00 ¶
func TxpoolToBst00(TxStr string) (TxBST, MineResult)
func TxpoolToGenesis ¶
func TxpoolToGenesis(TxStr string) (TxBST, MineResult)
func TxpoolToSpecial ¶
func TxpoolToSpecial(cubeno int, blockno int) (TxBST, MineResult)
func TxpoolToTr ¶
func TxpoolToTr(TxStr string, blockno int) (TxBST, MineResult)
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, v interface{}) error
Types ¶
type Block ¶
type Block struct { Cubeno int Blockno int Timestamp int Data []byte Merkle string Hash string PrevHash string PatternHash string Nonce int Mine MineResult }
func DataDeserialize ¶
func (*Block) BlockString ¶
func (*Block) BlockTxString ¶
func (*Block) GetPatternHash ¶
func (*Block) GetPrevHash ¶
func (*Block) GetPrevHash0 ¶
func (*Block) HashString ¶
func (*Block) InputString ¶
func (*Block) MineBroadcast ¶
func (*Block) MineDataString ¶
func (*Block) MineString ¶
func (*Block) PoolMining ¶
func (block *Block) PoolMining()
func (*Block) SetPatternHash ¶
func (block *Block) SetPatternHash()
func (*Block) SetPrevHash ¶
func (block *Block) SetPrevHash()
type CMineResult ¶
type Cube ¶
type Cube struct { Cubeno int Timestamp int Blocks [27]Block PrevHash string CHash string Nonce int Mine CMineResult }
var CurrCube Cube
func (*Cube) CubeString ¶
func (*Cube) Downloading ¶
func (*Cube) FileBroadcast ¶
func (*Cube) FileBroadcast2 ¶
func (cube *Cube) FileBroadcast2()
func (*Cube) GetPrevHash ¶
func (*Cube) GetPrevHash0 ¶
func (*Cube) HashString ¶
func (*Cube) InputChanel ¶
func (*Cube) MineBroadcast ¶
func (*Cube) MineString ¶
func (*Cube) SetPrevHash ¶
func (cube *Cube) SetPrevHash()
type CubeIndex ¶
func GetIndexBlock ¶
func GetIndexBlock_direct ¶
func GetIndexCube ¶
func StrToCubeIndex ¶
type Cubing ¶
type Cubing struct { Cubeno int Timestamp int Hash1 [27]string Hash2 [27]string PrevHash string CHash string Nonce int }
var PrvCubing Cubing
func CubingFileRead ¶
func CubingFileRead2 ¶
type EscrowData ¶
type MineResult ¶
type MineResult struct { TxMine string Txamount float64 Txcnt int Tkcnt int Concnt int Sumfee float64 }
func TxBlockData ¶
func TxBlockData(cubeno int, blockno int) ([]byte, MineResult)
type PairFloatList ¶
type PairFloatList []PairFloat
func PairSortFloat ¶
func PairSortFloat(sortmap map[string]float64) PairFloatList
func (PairFloatList) Len ¶
func (p PairFloatList) Len() int
func (PairFloatList) Less ¶
func (p PairFloatList) Less(i, j int) bool
func (PairFloatList) Swap ¶
func (p PairFloatList) Swap(i, j int)
type PoolMining ¶
type PoolMining struct { Timestamp int Cubeno int Blockno int HashStr string ResultHash string ResultNonce int Reward float64 Addr string Success bool }
func PohSet ¶
func PohSet(cubeno int) PoolMining
func (*PoolMining) CubeHeight ¶
func (pm *PoolMining) CubeHeight()
func (*PoolMining) HashString ¶
func (pm *PoolMining) HashString()
func (*PoolMining) Result ¶
func (pm *PoolMining) Result(rcnt int)
type StaticRule1 ¶
type StatisticData ¶
type TxData ¶
type TxData struct { Timestamp int From string To string Amount float64 Fee float64 Tax float64 Hash string Sign string Nonce int Message string Etc string Datatype string }
func BlockTxData ¶
func Deserialize ¶
func TdDeserialize ¶
func TreeToData ¶
func TxDeserialize ¶
func (*TxData) BtyeString ¶
func (*TxData) HashString ¶
func (*TxData) Transaction ¶
type TxIndexing ¶
type TxStatistic ¶
type TxStatistics ¶
type TxStatistics struct { Cubeno int AddrIndex map[string]StatisticData }
Click to show internal directories.
Click to hide internal directories.