MCPcopy Create free account

hub / github.com/corgi-kx/blockchain_golang / functions

Functions153 in github.com/corgi-kx/blockchain_golang

↓ 17 callersMethodView
查看数据
database/operates.go:42
↓ 10 callersFunctionInt64ToBytes
int64转换成字节数组
util/util.go:12
↓ 9 callersMethodPut
存入数据
database/operates.go:13
↓ 9 callersFunctionjointMessage
默认前十二位为命令名称
network/util.go:32
↓ 8 callersMethodSendMessage
基础发送信息方法
network/send.go:56
↓ 7 callersMethodNext
迭代下一个区块信息
blc/blockchain_iterator.go:18
↓ 6 callersFunctionIsVaildBitcoinAddress
判断是否是有效的比特币地址
blc/bitcoin_keys.go:177
↓ 6 callersFunctionNewBlockchain
创建区块链实例
blc/blockchain.go:20
↓ 6 callersFunctionNewBlockchainIterator
获取区块迭代器实例
blc/blockchain_iterator.go:12
↓ 6 callersFunctionbuildPeerInfoByAddr
通过固定格式的地址信息,构建出P2P节点信息对象
network/util.go:11
↓ 6 callersFunctiongeneratePublicKeyHash
(publicKey []byte)
blc/bitcoin_keys.go:152
↓ 5 callersMethodGetLastBlockHeight
获取最新区块高度
blc/blockchain.go:468
↓ 5 callersFunctionNew
()
database/database.go:27
↓ 5 callersMethodWrite
(p []byte)
util/ripemd160.go:64
↓ 5 callersFunctiongetSpecifiedContent
返回data字符串中,标签为tag的内容
cli/cli.go:111
↓ 4 callersMethodAddBlock
添加区块信息到数据库,并更新lastHash
blc/blockchain.go:371
↓ 4 callersFunctionGetAddressFromPublicKey
通过公钥信息获得地址
blc/bitcoin_keys.go:194
↓ 4 callersMethodGetBlockHashByHeight
通过高度获取区块hash
blc/blockchain.go:478
↓ 4 callersMethodResetUTXODataBase
重置UTXO数据库
blc/utxos.go:21
↓ 4 callersMethodfindUTXOFromAddress
根据地址未消费的utxo
blc/utxos.go:39
↓ 4 callersMethodgetAddress
通过公钥获得地址
blc/bitcoin_keys.go:115
↓ 4 callersFunctiongetPublicKeyHashFromAddress
(address string)
blc/bitcoin_keys.go:162
↓ 3 callersFunctionBase58Encode
base58编码
util/base58.go:11
↓ 3 callersMethodDeserialize
(d []byte)
blc/block.go:67
↓ 3 callersFunctionNewBitcoinKeys
创建公私钥实例
blc/bitcoin_keys.go:23
↓ 3 callersFunctionNewMerkelTree
(data [][]byte)
util/merkel_tree.go:20
↓ 3 callersMethodSendVersionToPeers
(height int)
blc/send.go:5
↓ 3 callersMethodVerify
检验区块是否有效
blc/proof_of_work.go:77
↓ 3 callersFunctioncheckSumHash
(versionPublickeyHash []byte)
blc/bitcoin_keys.go:169
↓ 3 callersMethodhash
对此笔交易的输入,输出进行hash运算后存入交易hash(txhash)
blc/transaction.go:21
↓ 3 callersFunctionprintUsage
打印帮助提示
cli/cli.go:16
↓ 3 callersMethodserialize
(utxos []*UTXO)
blc/utxos.go:112
↓ 3 callersMethodserialize
()
network/transit_version.go:15
↓ 3 callersMethodserliazle
()
blc/wallet.go:12
↓ 3 callersFunctionsplitMessage
默认前十二位为命令名称
network/util.go:43
↓ 2 callersFunctionBase58Decode
base58解码
util/base58.go:39
↓ 2 callersFunctionBuildMerkelNode
(left, right *MerkelNode, data []byte)
util/merkel_tree.go:50
↓ 2 callersMethodDeserialize
(d []byte)
blc/wallet.go:22
↓ 2 callersMethodGenerateWallet
生成钱包
blc/wallet.go:54
↓ 2 callersMethodGetPrivateKey
获取私钥
blc/bitcoin_keys.go:99
↓ 2 callersFunctionIsBucketExist
判断仓库是否存在
database/database.go:46
↓ 2 callersFunctionNewProofOfWork
获取POW实例
blc/proof_of_work.go:22
↓ 2 callersFunctionNewWallets
创建一个新钱包实例
blc/wallet.go:35
↓ 2 callersMethodReset
()
util/ripemd160.go:47
↓ 2 callersMethodSerialize
()
network/transit_transaction.go:24
↓ 2 callersFunction_Block
(md *digest, p []byte)
util/ripemd160block.go:49
↓ 2 callersMethodcustomCopy
从原交易里拷贝出一个新的交易
blc/transaction.go:82
↓ 2 callersMethoddeserialize
(d []byte)
network/transit_version.go:26
↓ 2 callersMethoddserialize
(d []byte)
blc/utxos.go:123
↓ 2 callersFunctionellipticCurveSign
使用私钥进行数字签名
blc/bitcoin_keys.go:216
↓ 2 callersFunctionellipticCurveVerify
使用公钥进行签名验证
blc/bitcoin_keys.go:226
↓ 2 callersMethodfindTransaction
查找交易id对应的交易信息
blc/blockchain.go:438
↓ 2 callersFunctionhandleTransaction
接收交易信息,满足条件后进行挖矿
network/handle.go:51
↓ 2 callersMethodhashSign
作为数字签名的hash方法,为什么不用gob序列化后hash,因为涉及到tcp传输gob直接序列化有问题,所以单独拼接成byte数组再hash
blc/transaction.go:32
↓ 2 callersFunctionisGenesisBlock
(block *Block)
blc/block.go:75
↓ 2 callersMethodjointData
将上一区块hash、数据、时间戳、难度位数、随机数 拼接成字节数组
blc/proof_of_work.go:91
↓ 2 callersFunctionmineBlock
进行挖矿来生成区块
blc/block.go:27
↓ 2 callersMethodnewKeyPair
根据中文助记词生成公私钥对
blc/bitcoin_keys.go:50
↓ 1 callersMethodCreataGenesisTransaction
创建创世区块交易信息
blc/blockchain.go:28
↓ 1 callersMethodCreataRewardTransaction
创建挖矿奖励地址交易
blc/blockchain.go:72
↓ 1 callersMethodCreateTransaction
创建UTXO交易实例
blc/blockchain.go:90
↓ 1 callersMethodDelete
删除数据
database/operates.go:71
↓ 1 callersMethodDeleteBucket
删除仓库
database/operates.go:98
↓ 1 callersMethodDeserialize
反序列化
blc/bitcoin_keys.go:143
↓ 1 callersMethodDeserialize
(d []byte)
network/transit_transaction.go:35
↓ 1 callersFunctionGenerateRealRandom
生成随机数
util/util.go:27
↓ 1 callersFunctionGetAddressFromPublicKeyHash
通过公钥信息获得地址
blc/bitcoin_keys.go:203
↓ 1 callersFunctionGetAllAddress
获取全部地址信息
blc/wallet.go:101
↓ 1 callersMethodGetBalance
传入地址 返回地址余额信息
blc/blockchain.go:498
↓ 1 callersMethodGetBlockByHash
通过区块hash获取区块信息
blc/blockchain.go:493
↓ 1 callersFunctionNew
()
cli/cli.go:33
↓ 1 callersFunctionNewRipemd160
New returns a new hash.Hash computing the checksum.
util/ripemd160.go:54
↓ 1 callersMethodPrintAllBlockInfo
打印区块链详细信息
blc/blockchain.go:554
↓ 1 callersMethodReceiveCMD
()
network/clier.go:5
↓ 1 callersMethodReceiveCMD
获取用户输入
cli/cli.go:44
↓ 1 callersMethodRun
()
cli/cli.go:37
↓ 1 callersMethodSendSignOutToPeers
向网络中其他节点发送本节点退出信号
network/send.go:15
↓ 1 callersMethodSendTransToPeers
(tss []Transaction)
blc/send.go:6
↓ 1 callersMethodSerialize
将transaction序列化成[]byte
blc/transaction.go:49
↓ 1 callersMethodSerialize
将Block对象序列化成[]byte
blc/block.go:56
↓ 1 callersMethodSetRewardAddress
设置挖矿奖励地址
blc/blockchain.go:345
↓ 1 callersFunctionStartNode
启动本地节点
network/server.go:27
↓ 1 callersMethodSum
(in []byte)
util/ripemd160.go:90
↓ 1 callersMethodSynchrodata
传入交易信息,将交易里的输出添加进utxo数据库,并剔除输入信息
blc/utxos.go:79
↓ 1 callersMethodTransfer
交易转账
blc/blockchain.go:261
↓ 1 callersMethodVerifyTransBalance
校验交易余额是否足够,如果不够则剔除
blc/blockchain.go:286
↓ 1 callersMethodaddBlockchain
将交易添加进区块链中(内含挖矿操作)
blc/blockchain.go:350
↓ 1 callersMethoddeserialize
(d []byte)
network/transit_getHash.go:25
↓ 1 callersMethoddeserialize
(d []byte)
network/transit_error.go:25
↓ 1 callersMethoddeserialize
(d []byte)
network/transit_getBlock.go:25
↓ 1 callersMethoddeserialize
(d []byte)
network/transit_hashMap.go:27
↓ 1 callersMethodfindAllUTXOs
查找数据库中全部未花费的UTXO
blc/blockchain.go:513
↓ 1 callersFunctionfindMK
(mn *MerkelNode, findTsHash []byte)
util/merkel_tree_test.go:45
↓ 1 callersFunctionfindP2PPeer
启动mdns寻找p2p网络 并等节点连接
network/server.go:69
↓ 1 callersMethodgenerateWallet
()
cli/cli_generateWallet.go:9
↓ 1 callersMethodgenesis
(address string, value int)
cli/cli_genesis.go:8
↓ 1 callersMethodgetBalance
(address string)
cli/cli_getBalance.go:8
↓ 1 callersFunctiongetChineseMnemonicWord
获取中文种子
blc/bitcoin_keys.go:71
↓ 1 callersMethodgetTransBytes
将整笔交易里的成员依次转换成字节数组,拼接成整体后 返回
blc/transaction.go:61
↓ 1 callersFunctionhandleBlock
接收到区块数据,进行验证后加入数据库
network/handle.go:127
next →1–100 of 153, ranked by callers