package
0.0.0-20231224052254-3c905e5ef12b
Repository: https://github.com/assetcloud/chain.git
Documentation: pkg.go.dev
# Functions
BitMapBit :index begin from 0, find the index bit, 1 or 0.
CalcBitMap subs are align with subData,get the bases' tx's bitmap from subs result if the tx ty is OK in subs, find the tx in base and set the index to 1, this function return base's bitmap if all tx failed, the setBit will normalize result and just return nil slice.
CalcBitMapByBitMap bitmap align with subs.
CalcSingleBitMap calc bitmap to bases by data.
CheckBlock : To check the block's validaty.
CheckDupTx : check use txs []*types.Transaction and not []*types.TransactionCache.
CheckTxDup : check whether the tx is duplicated within the while chain.
CloseTestDB 创建一个测试数据库.
CmpBestBlock : 选择最优区块,通知共识模块newblock是否是最优区块 height,time,parentHash一致时根据共识各自规则判断.
CreateCoinsBlock : create coins block, n size.
CreateCoinsTx : Create Coins Tx.
CreateCoinsTxWithTxHeight 使用txHeight作为交易过期.
CreateManageTx : Create Manage Tx.
CreateNewBlock : Create a New Block.
CreateNoneBlock : Create None Block.
CreateNoneTx : Create None Tx.
CreateNoneTxWithTxHeight 使用txHeight作为交易过期.
CreateTestDB 创建一个测试数据库.
CreateTxWithExecer : Create Tx With Execer.
CreateTxWithTxHeight : Create Tx With Tx Height.
DelDupKey 删除重复的key.
DelDupTx 删除重复的交易.
ExecAndCheckBlock ...
ExecAndCheckBlockCB :.
ExecBlock : just exec block.
ExecBlockUpgrade : just exec block.
ExecKVMemSet : send kv values to memory store and set it in db.
ExecKVSetCommit : commit the data set opetation to db.
ExecKVSetRollback : do the db's roll back operation.
ExecTx : To send lists of txs within a block to exector for execution.
Genaddress : generate a address.
GenCoinsTxs : generate txs to be executed on exector coin.
GenNoneTxs : 创建一些 none 执行器的 交易列表,一般用于测试.
GenTxsTxHeight : Gen Txs with Heigt.
GetAddrsByBitMap 根据bitmap获取addrGroup范围内的addrs,.
GetMostCommit 获取commits中最多的一个,数量和string.
GetParaExecName : 如果 name 没有 paraName 前缀,那么加上这个前缀.
HexToPrivkey : convert hex string to private key.
IsCommitDone 判断是否most 超过total*2/3.
JSONPrint : print in json format.
MakeStringToLower : 将给定的in字符串从pos开始一共count个转换为小写字母.
MakeStringToUpper : 将给定的in字符串从pos开始一共count个转换为大写字母.
NewHealthCheckServer new json rpcserver object.
PreExecBlock : pre exec block.
PrintKV 打印KVList.
ReportErrEventToFront 上报指定错误信息到指定模块,目前只支持从store,blockchain,wallet写数据库失败时上报错误信息到wallet模块, 然后由钱包模块前端定时调用显示给客户.
ResetDatadir 重写datadir.
SaveKVList 保存kvs to database.
SetAddrsBitMap 设置addrGroup范围内的bitmap,如果addrs在addrGroup不存在,也不设置,返回未命中的addrs.
UpdateExpireWithTxHeight 设置txHeight类型交易过期.
# Variables
TestPrivkeyHex :.
TestPrivkeyList : crypto.PrivKey list
addr:12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
addr:14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
addr:1EbDHAXpoiewjPLX9uqoz38HsKqMXayZrF
addr:1PUiGcbsccfxW3zuvHXZBJfznziph5miAo
addr:1KcCVZLSQYRUwE5EXTsAoQs9LuJW6xwfQa
addr:1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX
*/.
# Interfaces
TestingT 测试类型.