Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/corgi-kx/blockchain_golang
/ functions
Functions
153 in github.com/corgi-kx/blockchain_golang
⨍
Functions
153
◇
Types & classes
31
↓ 1 callers
Function
handleGetBlock
接收到获取区块命令,通过hash值 找到该区块 然后把该区块发送过去
network/handle.go:174
↓ 1 callers
Function
handleGetHash
接收到"获取hash列表"命令,返回对面节点所没有的区块的hash信息(两条链的高度差)
network/handle.go:206
↓ 1 callers
Function
handleHashMap
从对面节点处获取到本地区块链所没有的区块hash列表,然后依次发送"获取区块命令"到该节点
network/handle.go:185
↓ 1 callers
Function
handleMyError
打印接收到的错误信息
network/handle.go:42
↓ 1 callers
Function
handleVersion
接收到其他节点的区块高度信息,与本地区块高度进行对比
network/handle.go:222
↓ 1 callers
Method
importWalletByMnemonicword
(mnemonicword string)
cli/cli_importWalletByMnemonicword.go:11
↓ 1 callers
Function
initMDNS
启动MDNS服务
network/mdns.go:22
↓ 1 callers
Function
isGenesisTransaction
判断是否是创世区块的交易
blc/transaction.go:95
↓ 1 callers
Method
jointSpeed
将助记词拼接成字节数组,并截取前40位
blc/bitcoin_keys.go:62
↓ 1 callers
Function
mineBlock
(t Transactions)
network/handle.go:83
↓ 1 callers
Function
monitorP2PNodes
一个监测程序,监测当前网络中已发现的节点
network/server.go:79
↓ 1 callers
Function
newGenesisBlock
生成创世区块
blc/block.go:44
↓ 1 callers
Method
newGenesisBlockchain
创建区块链
blc/blockchain.go:60
↓ 1 callers
Function
paddedAppend
(size uint, dst, src []byte)
blc/bitcoin_keys.go:107
↓ 1 callers
Method
printAllAddress
()
cli/cli_printAllAddress.go:10
↓ 1 callers
Method
printAllBlock
()
cli/cli_printAllBlock.go:5
↓ 1 callers
Method
printAllWallets
()
cli/cli_printAllWallets.go:9
↓ 1 callers
Method
resetUTXODB
()
cli/cli_resetUTXODB.go:8
↓ 1 callers
Function
reverseBytes
(data []byte)
util/base58.go:61
↓ 1 callers
Method
run
进行hash运算,获取到当前区块的hash值
blc/proof_of_work.go:31
↓ 1 callers
Function
sendVersionToPeers
向其他p2p节点发送高度信息,来进行更新区块数据
network/server.go:99
↓ 1 callers
Method
serialize
()
network/transit_getHash.go:14
↓ 1 callers
Method
serialize
()
network/transit_error.go:14
↓ 1 callers
Method
serialize
()
network/transit_getBlock.go:14
↓ 1 callers
Method
serialize
()
network/transit_hashMap.go:16
↓ 1 callers
Method
setRewardAddress
(address string)
cli/cli_setRewardAddress.go:8
↓ 1 callers
Function
signalHandle
节点退出信号处理
network/server.go:113
↓ 1 callers
Method
signatureTransactions
对交易信息进行数字签名
blc/blockchain.go:381
↓ 1 callers
Method
startNode
()
cli/cli_startNode.go:7
↓ 1 callers
Method
storage
将钱包信息存入数据库
blc/wallet.go:78
↓ 1 callers
Method
transfer
(from, to, amount string)
cli/cli_transfer.go:9
↓ 1 callers
Method
userCmdHandle
用户输入命令的解析
cli/cli.go:58
↓ 1 callers
Method
verifyTransactionsSign
数字签名验证
blc/blockchain.go:407
Method
BlockSize
()
util/ripemd160.go:62
Function
BytesToInt
字节数组转换为int
util/util.go:19
Function
CreateBitcoinKeysByMnemonicWord
根据助记词创建公私钥
blc/bitcoin_keys.go:31
Method
HandlePeerFound
当网络中找到新节点时,此方法会被调用
network/mdns.go:17
Function
IsBlotExist
判断数据库是否存在
database/database.go:33
Method
SendTransToPeers
向网络中其他节点发送交易信息
network/send.go:35
Method
SendVersionToPeers
向网络中其他节点发送高度信息
network/send.go:25
Method
Size
()
util/ripemd160.go:60
Function
TestBytes
(t *testing.T)
network/server_test.go:5
Function
TestFindMerkelNode
(t *testing.T)
util/merkel_tree_test.go:23
Function
TestGetBitcoinKeys
(t *testing.T)
blc/bitcoin_keys_test.go:12
Function
TestGetNewMerkelTree
(t *testing.T)
util/merkel_tree_test.go:10
Function
TestMnemonicWord
(t *testing.T)
blc/bitcoin_keys_test.go:39
Function
TestReadTxt
(t *testing.T)
blc/bitcoin_keys_test.go:49
Function
TestSign
(t *testing.T)
blc/bitcoin_keys_test.go:22
Function
handleStream
对接收到的数据解析出命令,然后对不同的命令分别进行处理
network/handle.go:15
Function
init
初始化系统,读取config.yaml里面的配置信息并进行赋值
main.go:15
Function
init
()
util/ripemd160.go:21
Function
main
()
main.go:51
Method
serliazle
序列化
blc/bitcoin_keys.go:130
← previous
101–153 of 153, ranked by callers