MCPcopy Create free account

hub / github.com/cruzbit/cruzbit / functions

Functions346 in github.com/cruzbit/cruzbit

↓ 53 callersMethodString
String implements the Stringer interface
block.go:225
↓ 33 callersMethodAdd
Add adds the transaction to the queue. Returns true if the transaction was added to the queue on this call.
transaction_queue.go:9
↓ 29 callersMethodClose
Close is called to close any underlying storage.
ledger_disk.go:906
↓ 25 callersMethodID
ID computes an ID for a given block.
block.go:76
↓ 20 callersMethodGet
Get returns some peers for us to attempt to connect to.
peer_storage.go:12
↓ 17 callersFunctionroundFloat
From: https://groups.google.com/forum/#!topic/golang-nuts/ITZV08gAugI
wallet/main.go:822
↓ 16 callersMethodIsCoinbase
IsCoinbase returns true if the transaction is a coinbase. A coinbase is the first transaction in every block used to reward the miner for mining the b
transaction.go:88
↓ 16 callersMethodRead
the sha3 state objects aren't exported from stdlib but some of their methods like Read are. we can get the sum without the clone done by Sum which sav
block_header_hasher.go:51
↓ 15 callersMethodDelete
Delete is called to explicitly remove a peer address from storage.
peer_storage.go:18
↓ 15 callersMethodGetBlockHeader
GetBlockHeader returns the referenced block's header and the timestamp of when it was stored.
block_storage.go:18
↓ 14 callersMethodLen
Len returns the queue length.
transaction_queue.go:30
↓ 14 callersMethodRemove
Remove removes the block ID from the queue only if the requester is who is currently responsible for its download.
block_queue.go:62
↓ 14 callersFunctioncomputePubKeyTransactionIndexKey
( pubKey ed25519.PublicKey, height *int64, index *int)
ledger_disk.go:972
↓ 12 callersMethodGetBigInt
GetBigInt converts from BlockID to big.Int.
block.go:262
↓ 8 callersMethodGetKeys
GetKeys returns all of the public keys from the database.
wallet.go:160
↓ 8 callersFunctiondecryptPrivateKey
NaCl secretbox decrypt a private key with an Argon2id key derived from passphrase
wallet.go:650
↓ 7 callersMethodClose
Close is called to close any underlying storage.
block_storage_disk.go:224
↓ 7 callersMethodGetTransaction
GetTransaction returns a transaction within a block and the block's header.
block_storage.go:21
↓ 7 callersFunctionIsInitialBlockDownload
IsInitialBlockDownload returns true if it appears we're still syncing the block chain.
peer_manager.go:798
↓ 7 callersMethodSetBigInt
SetBigInt converts from big.Int to BlockID.
block.go:249
↓ 7 callersMethodVerify
Verify is called to verify only that the transaction is properly signed.
transaction.go:78
↓ 7 callersFunctioncompareIDs
(block *Block)
block_header_hasher_test.go:119
↓ 7 callersFunctioncomputeMaxTransactionsPerBlock
Computes the maximum number of transactions allowed in a block at the given height. Inspired by BIP 101
processor.go:540
↓ 7 callersFunctionencodePrivateKeyDbKey
(pubKey ed25519.PublicKey)
wallet.go:601
↓ 6 callersFunctionBlockCreationReward
BlockCreationReward computes the expected block reward for the given height.
processor.go:672
↓ 6 callersMethodGetBlockIDForHeight
GetBlockIDForHeight returns the ID of the block at the given block chain height.
ledger_disk.go:66
↓ 6 callersMethodGetBlockIDForHeight
GetBlockIDForHeight returns the ID of the block at the given block chain height.
ledger.go:31
↓ 6 callersMethodGetBranchType
GetBranchType returns the branch type for the given block.
ledger.go:37
↓ 6 callersFunctionNewTransaction
NewTransaction returns a new unsigned transaction.
transaction.go:40
↓ 6 callersMethodSign
Sign is called to sign a transaction.
transaction.go:68
↓ 6 callersMethodStore
Store stores a peer address. Returns true if the peer was newly added to storage.
peer_storage.go:9
↓ 6 callersFunctioncomputeLastAttemptTimeKey
(when int64, addr string)
peer_storage_disk.go:448
↓ 6 callersFunctiongetChainTipHeader
Convenience method to get the current main chain's tip ID, header, and storage time.
processor.go:975
↓ 6 callersFunctiongetPeerInfo
Helper to lookup peer info
peer_storage_disk.go:296
↓ 5 callersMethodGetBlock
Get returns the referenced block.
block_storage.go:12
↓ 5 callersMethodGetChainTip
GetChainTip returns the ID and the height of the block at the current tip of the main chain.
ledger.go:28
↓ 5 callersMethodGetPublicKeyBalance
GetPublicKeyBalance returns the current balance of a given public key.
ledger.go:48
↓ 5 callersFunctioncomputeLastSuccessTimeKey
(when int64, addr string)
peer_storage_disk.go:474
↓ 5 callersFunctioncomputePubKeyBalanceKey
(pubKey ed25519.PublicKey)
ledger_disk.go:1017
↓ 5 callersFunctioncomputeTransactionIndexKey
(id TransactionID)
ledger_disk.go:961
↓ 4 callersMethodGetChainTip
GetChainTip returns the ID and the height of the block at the current tip of the main chain.
ledger_disk.go:35
↓ 4 callersMethodPeek
Peek returns the ID of the block at the front of the queue.
block_queue.go:85
↓ 4 callersMethodProcessBlock
ProcessBlock is called to process a new candidate block chain tip.
processor.go:156
↓ 4 callersMethodShutdown
Shutdown stops the peer manager synchronously.
peer_manager.go:261
↓ 4 callersFunctioncomputeBranchTypeKey
(id BlockID)
ledger_disk.go:931
↓ 4 callersFunctioncomputeMedianTimestamp
Compute the median timestamp of the last NUM_BLOCKS_FOR_MEDIAN_TIMESTAMP blocks
processor.go:796
↓ 4 callersFunctiongetBlockIDForHeight
Sometimes we call this with *leveldb.DB or *leveldb.Snapshot
ledger_disk.go:71
↓ 4 callersMethodoutboundPeerCount
()
peer_manager.go:299
↓ 3 callersMethodApply
Apply applies the effect of the transaction to the invovled parties' cached balances. It returns false if sender balance would go negative as a result
balance_cache.go:34
↓ 3 callersMethodContains
Contains returns true if the transaction is relevant to the given public key.
transaction.go:93
↓ 3 callersMethodExists
Exists returns true if the given transaction is in the queue.
transaction_queue.go:24
↓ 3 callersMethodGetTipHeader
GetTipHeader returns the current tip of the main chain's header.
wallet.go:260
↓ 3 callersMethodID
ID computes an ID for a given transaction.
transaction.go:56
↓ 3 callersMethodIsConnected
IsConnected returns true if the wallet is connected to a peer.
wallet.go:217
↓ 3 callersMethodIsExpired
IsExpired returns true if the transaction cannot be mined at the given height.
transaction.go:111
↓ 3 callersMethodIsMature
IsMature returns true if the transaction can be mined at the given height.
transaction.go:103
↓ 3 callersFunctionNewBalanceCache
NewBalanceCache returns a new instance of a BalanceCache.
balance_cache.go:20
↓ 3 callersFunctionNewBlock
SHA3-256 hash NewBlock creates and returns a new Block to be mined.
block.go:43
↓ 3 callersFunctionNewBlockQueue
NewBlockQueue returns a new instance of a BlockQueue.
block_queue.go:29
↓ 3 callersMethodOnConnectSuccess
OnConnectSuccess is called upon successful handshake with the peer.
peer_storage.go:24
↓ 3 callersMethodReset
Reset resets the balance cache.
balance_cache.go:27
↓ 3 callersMethodSetFilter
SetFilter sets the filter for the connection.
wallet.go:288
↓ 3 callersFunctioncheckTransactionSeries
The series must be within the acceptable range given the current height
processor.go:374
↓ 3 callersFunctioncomputeBlockHeightIndexKey
(height int64)
ledger_disk.go:942
↓ 3 callersFunctioncomputeChainTipKey
()
ledger_disk.go:953
↓ 3 callersFunctioncomputePeerKey
(addr string)
peer_storage_disk.go:437
↓ 3 callersMethodconnect
Connect to a peer
peer_manager.go:403
↓ 3 callersMethodconnectBlock
Update the ledger and transaction queue and notify new tip channels
processor.go:933
↓ 3 callersMethodconnectToPeers
Try connecting to some recent peers
peer_manager.go:306
↓ 3 callersMethodcreateNewWorkBlock
Create a new work block for a mining peer. Called from the writer goroutine loop.
peer.go:1589
↓ 3 callersFunctiondecodePubKeyTransactionIndexKey
(key []byte)
ledger_disk.go:997
↓ 3 callersFunctionencryptPrivateKey
encryption utility functions NaCl secretbox encrypt a private key with an Argon2id key derived from passphrase
wallet.go:627
↓ 3 callersMethodfilterLookup
Returns true if the transaction is of interest to the peer
peer.go:1481
↓ 3 callersMethodprocessDownloadQueue
Try requesting blocks that are in the download queue
peer.go:949
↓ 3 callersMethodsendFindCommonAncestor
Send a message to look for a common ancestor with a peer Might be called from reader or writer context. writeNow means we're in the writer context
peer.go:1004
↓ 3 callersFunctionshowTransaction
(w *Wallet, tx *Transaction, height int64)
wallet/main.go:740
↓ 3 callersMethodwriteToBatch
Helper to write the peer info to a batch
peer_storage_disk.go:405
↓ 2 callersMethodAddTransaction
AddTransaction adds a new transaction to the block. Called by miner when mining a new block.
block.go:86
↓ 2 callersMethodBalances
Balances returns the underlying cache of balances.
balance_cache.go:112
↓ 2 callersMethodClose
Close is called to close any underlying storage.
peer_storage_disk.go:291
↓ 2 callersMethodGetBlock
Get returns the referenced block.
block_storage_disk.go:121
↓ 2 callersMethodGetBlockBytes
GetBlockBytes returns the referenced block as a byte slice.
block_storage_disk.go:136
↓ 2 callersMethodGetPublicKeyBalances
GetPublicKeyBalances returns the current balance of the given public keys along with block ID and height of the corresponding main chain tip.
ledger.go:52
↓ 2 callersMethodGetSince
GetSince returns some peers to tell others about last active less than "when" ago.
peer_storage.go:15
↓ 2 callersMethodGetTransactionIndex
GetTransactionIndex returns the index of a processed transaction.
ledger.go:56
↓ 2 callersFunctionHandlePortForward
HandlePortForward manages port (un)forwarding using UPnP.
upnp.go:11
↓ 2 callersMethodIDFast
IDFast computes an ID for a given block header when mining.
block.go:182
↓ 2 callersFunctionNewBlockStorageDisk
NewBlockStorageDisk returns a new instance of on-disk block storage.
block_storage_disk.go:34
↓ 2 callersMethodNewKeys
NewKeys generates, encrypts and stores new private keys and returns the public keys.
wallet.go:92
↓ 2 callersFunctionNewLedgerDisk
NewLedgerDisk returns a new instance of LedgerDisk.
ledger_disk.go:25
↓ 2 callersFunctionNewPeer
NewPeer returns a new instance of a peer.
peer.go:61
↓ 2 callersMethodOnClose
OnClose specifies a handler to call when the peer connection is closed.
peer.go:133
↓ 2 callersMethodOnDisconnect
OnDisconnect is called upon disconnection.
peer_storage.go:30
↓ 2 callersMethodRegisterForNewTransactions
RegisterForNewTransactions is called to register to receive notifications of newly queued transactions.
processor.go:163
↓ 2 callersMethodRegisterForTipChange
RegisterForTipChange is called to register to receive notifications of tip block changes.
processor.go:173
↓ 2 callersMethodRun
Run executes the peer's main loop in its own goroutine. It manages reading and writing to the peer's WebSocket and facilitating the protocol.
peer.go:184
↓ 2 callersMethodShutdown
Shutdown stops the processor synchronously.
processor.go:183
↓ 2 callersMethodUnregisterForNewTransactions
UnregisterForNewTransactions is called to unregister to receive notifications of newly queued transactions
processor.go:168
↓ 2 callersMethodUnregisterForTipChange
UnregisterForTipChange is called to unregister to receive notifications of tip block changes.
processor.go:178
↓ 2 callersMethodacceptBlockContinue
Continue accepting the block
processor.go:816
next →1–100 of 346, ranked by callers