Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cruzbit/cruzbit
/ functions
Functions
346 in github.com/cruzbit/cruzbit
⨍
Functions
346
◇
Types & classes
70
↓ 2 callers
Function
addCoinbaseToHashListRoot
Add the coinbase to the hash list root
block.go:126
↓ 2 callers
Function
checkTransaction
Context-free transaction sanity checker
processor.go:281
↓ 2 callers
Function
computeChainWork
Compute cumulative chain work given a block's target and the previous chain work
block.go:164
↓ 2 callers
Function
computeHashListRoot
Compute a hash list root of all transaction hashes
block.go:107
↓ 2 callers
Function
computeTarget
Compute expected target of the current block
processor.go:683
↓ 2 callers
Function
createNextBlock
Called by the miner as well as the peer to support get_work.
miner.go:255
↓ 2 callers
Method
createNextBlock
Create a new block off of the given tip block.
miner.go:248
↓ 2 callers
Function
decodeBlockHeader
(encodedHeader []byte)
block_storage_disk.go:242
↓ 2 callers
Method
deletePeer
Helper to delete a peer
peer_storage_disk.go:318
↓ 2 callers
Function
determineExternalIP
Determine external IP address
peer_manager.go:788
↓ 2 callers
Function
displayBlock
(id BlockID, block *Block)
inspector/main.go:205
↓ 2 callers
Function
encodeBlockHeader
leveldb schema: {bid} -> {timestamp}{gob encoded header}
block_storage_disk.go:230
↓ 2 callers
Function
encodeChainTip
(id BlockID, height int64)
ledger_disk.go:1028
↓ 2 callers
Function
encodeNumber
(num int64)
ledger_disk.go:1052
↓ 2 callers
Function
encodeTransactionIndex
(height int64, index int)
ledger_disk.go:1060
↓ 2 callers
Method
getBlock
(id BlockID, outChan chan<- Message)
peer.go:831
↓ 2 callers
Method
getBlockHeader
(id BlockID, outChan chan<- Message)
peer.go:1138
↓ 2 callers
Function
getChainTip
Sometimes we call this with *leveldb.DB or *leveldb.Snapshot
ledger_disk.go:40
↓ 2 callers
Method
initBuffer
Initialize the buffer to be hashed
block_header_hasher.go:82
↓ 2 callers
Method
listenForPeers
Check to see if it's time to start accepting connections and do so if necessary
peer_manager.go:432
↓ 2 callers
Method
parsePeerAddress
Parse, resolve and validate peer addreses
peer_manager.go:724
↓ 2 callers
Function
promptForPublicKey
(prompt string, rightJustify int, reader *bufio.Reader)
wallet/main.go:638
↓ 2 callers
Function
promptForString
(prompt, defaultResponse string, reader *bufio.Reader)
wallet/main.go:702
↓ 2 callers
Function
promptForValue
(prompt string, rightJustify int, reader *bufio.Reader)
wallet/main.go:655
↓ 2 callers
Method
removeFromOutboundSet
Helper to remove peers from the outbound set
peer_manager.go:681
↓ 2 callers
Function
sha3_keccakf
opencl/sha3.cc:12
↓ 2 callers
Function
sha3_keccakf
cuda/sha3.cc:12
↓ 2 callers
Function
stretchPassphrase
Strecth passphrase into a 32 byte key with Argon2id
wallet.go:687
↓ 2 callers
Function
transactionIsRelevant
Catch filter false-positives
wallet/main.go:776
↓ 2 callers
Method
updateReadLimit
Update the read limit if necessary
peer.go:1660
↓ 1 callers
Method
AddBatch
AddBatch adds a batch of transactions to the queue (a block has been disconnected.) "height" is the block chain height after this disconnection.
transaction_queue.go:13
↓ 1 callers
Method
AddKey
AddKey adds an existing key pair to the database.
wallet.go:137
↓ 1 callers
Method
Balance
Balance returns the total current ledger balance by summing the balance of all public keys. It's only used offline for verification purposes.
ledger.go:66
↓ 1 callers
Method
CheckPOW
CheckPOW verifies the block's proof-of-work satisfies the declared target.
block.go:81
↓ 1 callers
Function
CheckpointCheck
CheckpointCheck returns an error if the passed height is a checkpoint and the passed block ID does not match the given checkpoint block ID.
checkpoints.go:23
↓ 1 callers
Method
Compare
Compare returns true if the header indicates it is a better chain than "theirHeader" up to both points. "thisWhen" is the timestamp of when we stored
block.go:192
↓ 1 callers
Method
Connect
Connect connects to a peer for transaction history, balance information, and sending new transactions. The threat model assumes the peer the wallet is
wallet.go:202
↓ 1 callers
Method
Connect
Connect connects the IRC bootstrapper to the IRC network. port is our local cruzbit port. If it's set to 0 we won't be used for inbound connections.
irc.go:36
↓ 1 callers
Method
Connect
Connect connects outbound to a peer.
peer.go:91
↓ 1 callers
Method
ConnectBlock
ConnectBlock connects a block to the tip of the block chain and applies the transactions to the ledger.
ledger.go:41
↓ 1 callers
Function
CudaInit
CudaInit is called on startup.
cuda.go:25
↓ 1 callers
Function
CudaMinerMine
CudaMinerMine is called on every solution attempt by a miner goroutine. It will perform N hashing attempts where N is the maximum number of threads yo
cuda.go:39
↓ 1 callers
Function
CudaMinerUpdate
CudaMinerUpdate is called by a miner goroutine when the underlying header changes.
cuda.go:30
↓ 1 callers
Method
DisconnectBlock
DisconnectBlock disconnects a block from the tip of the block chain and undoes the effects of the transactions on the ledger.
ledger.go:45
↓ 1 callers
Method
ExistsSigned
ExistsSigned returns true if the given transaction is in the queue and contains the given signature.
transaction_queue.go:27
↓ 1 callers
Method
GetBalance
GetBalance returns a public key's balance as well as the current block height.
wallet.go:232
↓ 1 callers
Method
GetBlockBytes
GetBlockBytes returns the referenced block as a byte slice.
block_storage.go:15
↓ 1 callers
Method
GetPrivateKey
Retrieve a private key for a given public key
wallet.go:183
↓ 1 callers
Method
GetPublicKeyBalance
GetPublicKeyBalance returns the current balance of a given public key.
ledger_disk.go:547
↓ 1 callers
Method
GetPublicKeyBalanceAt
GetPublicKeyBalanceAt returns the public key balance at the given height. It's only used offline for historical and verification purposes. This is onl
ledger_disk.go:830
↓ 1 callers
Method
GetPublicKeyBalanceAt
GetPublicKeyBalanceAt returns the public key balance at the given height. It's only used offline for historical and verification purposes. This is onl
ledger.go:71
↓ 1 callers
Method
GetPublicKeyTransactionIndicesRange
GetPublicKeyTransactionIndicesRange returns transaction indices involving a given public key over a range of heights. If startHeight > endHeight this
ledger_disk.go:662
↓ 1 callers
Method
GetPublicKeyTransactionIndicesRange
GetPublicKeyTransactionIndicesRange returns transaction indices involving a given public key over a range of heights. If startHeight > endHeight this
ledger.go:60
↓ 1 callers
Method
GetPublicKeyTransactions
GetPublicKeyTransactions retrieves information about historic transactions involving the given public key.
wallet.go:393
↓ 1 callers
Method
GetTransaction
GetTransaction retrieves information about a historic transaction.
wallet.go:379
↓ 1 callers
Method
GetTransaction
GetTransaction returns a transaction within a block and the block's header.
block_storage_disk.go:193
↓ 1 callers
Method
GetTransactionIndex
GetTransactionIndex returns the index of a processed transaction.
ledger_disk.go:623
↓ 1 callers
Method
GetTransactionRelayPolicy
GetTransactionRelayPolicy returns the peer's transaction relay policy.
wallet.go:274
↓ 1 callers
Method
ID
ID computes an ID for a given block header.
block.go:173
↓ 1 callers
Function
NewBlockHeaderHasher
NewBlockHeaderHasher returns a newly initialized BlockHeaderHasher
block_header_hasher.go:66
↓ 1 callers
Function
NewDNSSeeder
NewDNSSeeder creates a new DNS seeder given a PeerStorage interface.
dns.go:27
↓ 1 callers
Function
NewHashrateMonitor
NewHashrateMonitor returns a new HashrateMonitor instance.
miner.go:58
↓ 1 callers
Function
NewIRC
NewIRC returns a new IRC bootstrapper.
irc.go:30
↓ 1 callers
Function
NewMiner
NewMiner returns a new Miner instance.
miner.go:39
↓ 1 callers
Function
NewPeerManager
NewPeerManager returns a new PeerManager instance.
peer_manager.go:58
↓ 1 callers
Function
NewPeerStorageDisk
NewPeerStorageDisk returns a new PeerStorageDisk instance.
peer_storage_disk.go:28
↓ 1 callers
Function
NewProcessor
NewProcessor returns a new Processor instance.
processor.go:70
↓ 1 callers
Function
NewTransactionQueueMemory
NewTransactionQueueMemory returns a new NewTransactionQueueMemory instance.
transaction_queue_memory.go:23
↓ 1 callers
Function
NewWallet
NewWallet returns a new Wallet instance.
wallet.go:41
↓ 1 callers
Method
OnConnectAttempt
OnConnectAttempt is called prior to attempting to connect to the peer.
peer_storage.go:21
↓ 1 callers
Method
OnConnectFailure
OnConnectFailure is called upon connection failure.
peer_storage.go:27
↓ 1 callers
Function
OpenCLInit
OpenCLInit is called on startup.
opencl.go:25
↓ 1 callers
Function
OpenCLMinerMine
OpenCLMinerMine is called on every solution attempt by a miner goroutine. It will perform N hashing attempts where N is the maximum number of threads
opencl.go:39
↓ 1 callers
Function
OpenCLMinerUpdate
OpenCLMinerUpdate is called by a miner goroutine when the underlying header changes.
opencl.go:30
↓ 1 callers
Method
ProcessTransaction
ProcessTransaction is called to process a new candidate transaction for the transaction queue.
processor.go:149
↓ 1 callers
Method
RemoveBatch
RemoveBatch removes a batch of transactions from the queue (a block has been connected.) "height" is the block chain height after this connection. "mo
transaction_queue.go:18
↓ 1 callers
Method
Run
Run executes the PeerManager's main loop in its own goroutine. It determines our connectivity and manages sourcing peer addresses from seed sources as
peer_manager.go:120
↓ 1 callers
Method
Run
Run executes the Wallet's main loop in its own goroutine. It manages reading and writing to the peer WebSocket.
wallet.go:452
↓ 1 callers
Method
Run
Run executes the main loop for the DNSSeeder in its own goroutine.
dns.go:77
↓ 1 callers
Method
Run
Run executes the IRC bootstrapper's main loop in its own goroutine.
irc.go:89
↓ 1 callers
Method
Run
Run executes the miner's main loop in its own goroutine.
miner.go:66
↓ 1 callers
Method
Run
Run executes the hashrate monitor's main loop in its own goroutine.
miner.go:292
↓ 1 callers
Method
Run
Run executes the Processor's main loop in its own goroutine. It verifies and processes blocks and transactions.
processor.go:90
↓ 1 callers
Method
Send
Send creates, signs and pushes a transaction out to the network.
wallet.go:321
↓ 1 callers
Method
SetBranchType
SetBranchType sets the branch type for the given block.
ledger.go:34
↓ 1 callers
Method
SetFilterBlockCallback
SetFilterBlockCallback sets a callback to receive new filter blocks with confirmed transactions relevant to this wallet.
wallet.go:227
↓ 1 callers
Method
SetPassphrase
(passphrase string)
wallet.go:60
↓ 1 callers
Method
SetTransactionCallback
SetTransactionCallback sets a callback to receive new transactions relevant to the wallet.
wallet.go:222
↓ 1 callers
Method
Shutdown
Shutdown is called to shutdown the wallet synchronously.
wallet.go:560
↓ 1 callers
Method
Shutdown
Shutdown shuts down the DNS seeder server.
dns.go:111
↓ 1 callers
Method
Shutdown
Shutdown stops the IRC bootstrapper.
irc.go:98
↓ 1 callers
Method
Shutdown
Shutdown is called to shutdown the underlying WebSocket synchronously.
peer.go:138
↓ 1 callers
Method
Shutdown
Shutdown stops the miner synchronously.
miner.go:241
↓ 1 callers
Method
Shutdown
Shutdown stops the hashrate monitor synchronously.
miner.go:323
↓ 1 callers
Method
String
String implements the Stringer interface.
transaction.go:119
↓ 1 callers
Method
Undo
Undo undoes the effects of a transaction on the invovled parties' cached balances.
balance_cache.go:75
↓ 1 callers
Method
Update
Update is called everytime the header is updated and the caller wants its new hash value/ID.
block_header_hasher.go:152
↓ 1 callers
Method
VerifyKey
VerifyKey verifies that the private key associated with the given public key is intact in the database.
wallet.go:419
↓ 1 callers
Method
acceptBlock
Attempt to extend the chain with the new block
processor.go:559
↓ 1 callers
Method
acceptConnections
Accept incoming peer connections
peer_manager.go:490
← previous
next →
101–200 of 346, ranked by callers