MCPcopy Create free account

hub / github.com/blkchain/blkchain / functions

Functions167 in github.com/blkchain/blkchain

↓ 42 callersMethodExec
(query string, args ...interface{})
db/postgres.go:1002
↓ 30 callersFunctionBinRead
BinRead will see if BinReader interface is provided, otherwise it falls back to LittleEndian binary.Read.
binary.go:32
↓ 18 callersFunctionBinWrite
Similar to BinRead, check for BinWriter, defer to binary.Write.
binary.go:40
↓ 16 callersMethodHash
()
tx.go:17
↓ 13 callersMethodClose
()
block_header.go:32
↓ 11 callersMethodWrite
(p []byte)
btcnode/log.go:15
↓ 11 callersFunctioncompactSizeSize
(i uint64)
binary.go:74
↓ 10 callersFunctionbegin
(db *sql.DB, table string, cols []string)
db/postgres.go:869
↓ 10 callersFunctioncommit
(stmt *sql.Stmt, txn *sql.Tx, misses []*prevoutMiss)
db/postgres.go:888
↓ 8 callersMethodNext
()
block_header.go:29
↓ 8 callersMethodSize
()
tx.go:31
↓ 7 callersMethodString
()
uint256.go:14
↓ 6 callersMethodQuery
(query string, args ...any)
db/postgres.go:1003
↓ 6 callersMethodScan
Satisfy sql.Scanner
uint32.go:8
↓ 5 callersMethodCount
()
block_header.go:27
↓ 4 callersMethodBaseSize
()
tx.go:23
↓ 4 callersMethodWeight
()
tx.go:39
↓ 4 callersFunctionreadList
(r io.Reader, doRead func(io.Reader) error)
binary.go:133
↓ 3 callersFunctionReadVarInt
This is equivalent of serialize.h:ReadVarInt() https://github.com/bitcoin/bitcoin/blob/0.15/src/serialize.h#L334 The origin of this encoding is not cl
binary.go:165
↓ 3 callersMethodSize
()
block.go:23
↓ 3 callersMethodUptime
()
db/postgres.go:112
↓ 3 callersMethodVirtualSize
()
tx.go:50
↓ 3 callersFunctiongetHeightAndHashes
(db *sql.DB, back int)
db/postgres.go:922
↓ 3 callersFunctionreadCompactSize
(r io.Reader)
binary.go:47
↓ 3 callersFunctionreadString
(r io.Reader)
binary.go:110
↓ 3 callersFunctionwriteList
(w io.Writer, size int, doWrite func(io.Writer, int) error)
binary.go:147
↓ 3 callersFunctionwriteString
(s []byte, w io.Writer)
binary.go:125
↓ 2 callersMethodBaseSize
()
tx_in.go:17
↓ 2 callersMethodClose
()
db/postgres.go:107
↓ 2 callersFunctionConnectToNode
(addr string, tmout time.Duration)
btcnode/btcnode.go:281
↓ 2 callersMethodCurrentHeight
()
block_header.go:28
↓ 2 callersMethodHeightAndHashes
(back int)
db/postgres.go:130
↓ 2 callersFunctionNewPGWriter
(connstr string, cacheSize int, utxo isUTXOer, zfsDataset string, parallel int)
db/postgres.go:41
↓ 2 callersMethodSetOrphans
Set the orphan status starting from the highest block and going backwards, up to limit. If limit is 0, the whole table is updated. The WITH RECURSIVE
db/postgres.go:1613
↓ 2 callersFunctionShaSha256
NB: we interpret this as little-endian. Traditionally Bitcoin transaction ids are printed in big-endian, i.e. reverse of this.
uint256.go:38
↓ 2 callersMethodWriteBlock
(b *BlockRec, sync bool)
db/postgres.go:116
↓ 2 callersMethodadd
(hash blkchain.Uint256, id int64, cnt int)
db/txidcache.go:136
↓ 2 callersMethodblockHeader
()
coredb/leveldb.go:117
↓ 2 callersFunctionfixPrevoutTxId
Most of the prevout_tx_id's should be already set during the import, but we need to correct the remaining ones. You can likely avoid it by increasing
db/postgres.go:1086
↓ 2 callersMethodgetBlock
Get a block from the node
btcnode/btcnode.go:228
↓ 2 callersFunctionprocessBlocks
(writer *db.PGWriter, bhs blkchain.BlockHeaderIndex, sync bool, interrupt chan bool)
cmd/import/import.go:303
↓ 2 callersMethodreportStats
(cols bool)
db/txidcache.go:197
↓ 2 callersFunctiontakeSnapshot
(db *sql.DB, dataset string, height int, tag string)
db/postgres.go:1735
↓ 2 callersFunctionwriteCompactSize
(i uint64, w io.Writer)
binary.go:87
↓ 1 callersMethodBaseSize
()
block.go:19
↓ 1 callersMethodBinRead
(io.Reader)
binary.go:24
↓ 1 callersMethodBinWrite
(io.Writer)
binary.go:27
↓ 1 callersMethodBlockHeader
()
block_header.go:30
↓ 1 callersMethodBlockHeader
()
btcnode/btcnode.go:59
↓ 1 callersMethodHash
()
block_header.go:16
↓ 1 callersMethodIsUTXO
(blkchain.Uint256, uint32)
db/postgres.go:38
↓ 1 callersFunctionNewChainStateChecker
(path string)
coredb/leveldb.go:229
↓ 1 callersMethodReadBlock
()
block_header.go:31
↓ 1 callersFunctionReadBtcnodeBlockHeaderIndex
(addr string, tmout time.Duration, hashes map[int][]blkchain.Uint256)
btcnode/btcnode.go:266
↓ 1 callersFunctionReadLevelDbBlockHeaderIndex
Returns a levelDbBlockHeaderIndex over which we can iterate with Next(). Some heights have multiple blocks. This func removes orphans (TODO - why do w
coredb/leveldb.go:174
↓ 1 callersFunctionSetRLimit
(requiredParam uint64)
rlimit/rlimit_freebsd.go:11
↓ 1 callersMethodSize
()
tx_out.go:10
↓ 1 callersMethodSize
()
tx_in.go:24
↓ 1 callersFunctionUint256FromBytes
(from []byte)
uint256.go:43
↓ 1 callersMethodWaitForBlock
Wait for inventory of block(s) from the node.
btcnode/btcnode.go:348
↓ 1 callersFunctionWriteVarInt
https://github.com/bitcoin/bitcoin/blob/0.15/src/serialize.h#L317
binary.go:188
↓ 1 callersMethodaddRing
Returns cached id if it is recent, otherwise -1
db/txidcache.go:92
↓ 1 callersMethodbinWriteWithoutWitness
(w io.Writer)
tx.go:144
↓ 1 callersFunctionblockFromMsgBlock
(mb *wire.MsgBlock, magic uint32)
btcnode/btcnode.go:208
↓ 1 callersFunctionbtcNodeCatchUp
(writer *db.PGWriter, addr string, tmout time.Duration, cacheSize int, interrupt chan bool)
cmd/import/import.go:140
↓ 1 callersMethodcheck
Note that check is destructive, see comment at the top.
db/txidcache.go:174
↓ 1 callersMethodcheckSize
()
db/txidcache.go:125
↓ 1 callersMethodclear
()
db/txidcache.go:87
↓ 1 callersFunctionclearPrevoutMissTable
(db execer)
db/postgres.go:1020
↓ 1 callersFunctioncreateConstraints
(db *sql.DB, verbose bool)
db/postgres.go:1527
↓ 1 callersFunctioncreateIndexes1
Create indexes only necessary to run fixPrevoutTxId(). Since we are updating txins, a presense of the txins(addr_prefix(... index would slow the updat
db/postgres.go:1244
↓ 1 callersFunctioncreateIndexes2
(db *sql.DB, verbose bool)
db/postgres.go:1274
↓ 1 callersFunctioncreatePgcrypto
(db *sql.DB)
db/postgres.go:1235
↓ 1 callersFunctioncreatePrevoutMissTable
(db execer)
db/postgres.go:1006
↓ 1 callersFunctioncreateTables
(db *sql.DB)
db/postgres.go:1153
↓ 1 callersFunctioncreateTxinsTriggers
(db *sql.DB)
db/postgres.go:1664
↓ 1 callersFunctiondecompressAmount
This is copied from C++ https://github.com/bitcoin/bitcoin/blob/0.15/src/compressor.cpp#L161
coredb/utxo.go:95
↓ 1 callersFunctiondecompressScript
https://github.com/bitcoin/bitcoin/blob/0.15/src/compressor.cpp#L88
coredb/utxo.go:129
↓ 1 callersFunctiondropPrevoutMissTable
(db *sql.DB)
db/postgres.go:1025
↓ 1 callersFunctioneliminateOrphans
Eliminate orphans by walking the chan backwards and whenever we see more than one block at a height, picking the one that matches its descendant's Pre
coredb/leveldb.go:272
↓ 1 callersFunctioneliminateOrphans
Eliminate orphans by walking the chan backwards and whenever we see more than one block at a height, picking the one that matches its descendant's Pre
btcnode/btcnode.go:402
↓ 1 callersFunctionfixPrevoutTxIdAnalyze
(db execer)
db/postgres.go:1148
↓ 1 callersMethodgetHeaders
(startHashes map[int][]blkchain.Uint256)
btcnode/btcnode.go:71
↓ 1 callersFunctiongetLastBlockId
(db *sql.DB)
db/postgres.go:958
↓ 1 callersFunctiongetLastTxId
(db *sql.DB)
db/postgres.go:979
↓ 1 callersFunctiongetSpecialSize
https://github.com/bitcoin/bitcoin/blob/0.15/src/compressor.cpp#L79
coredb/utxo.go:118
↓ 1 callersFunctionnewTxIdCache
(sz int)
db/txidcache.go:66
↓ 1 callersMethodpgBlockWorker
(ch <-chan *BlockRec, wg *sync.WaitGroup, firstImport bool, cacheSize int, utxo isUTXOer)
db/postgres.go:134
↓ 1 callersFunctionpgBlockWriter
(c chan *BlockRec, errCh chan<- error, db *sql.DB)
db/postgres.go:478
↓ 1 callersFunctionpgTxInWriter
(c chan *txInRec, errCh chan<- error, db *sql.DB, firstImport bool)
db/postgres.go:651
↓ 1 callersFunctionpgTxOutWriter
(c chan *txOutRec, errCh chan<- error, db *sql.DB, utxo isUTXOer)
db/postgres.go:782
↓ 1 callersFunctionpgTxWriter
(c chan *txRec, errCh chan<- error, db *sql.DB)
db/postgres.go:535
↓ 1 callersFunctionprevoutMissMaxId
(db execer)
db/postgres.go:1030
↓ 1 callersFunctionprocessEachNewBlock
(writer *db.PGWriter, addr string, tmout time.Duration, interrupt chan bool)
cmd/import/import.go:168
↓ 1 callersFunctionprocessEverythingBtcNode
(dbconnect, addr string, tmout time.Duration, cacheSize int, wait bool)
cmd/import/import.go:80
↓ 1 callersFunctionprocessEverythingLevelDb
(dbconnect, blocksPath, indexPath, chainStatePath string, magic uint32, cacheSize int, zfsDataset string, para
cmd/import/import.go:236
↓ 1 callersFunctionreadMagic
(r io.Reader)
binary.go:9
↓ 1 callersFunctionrecordPrevoutMiss
(db *sql.DB, txId int64, n int, prevoutHash blkchain.Uint256)
db/postgres.go:1046
↓ 1 callersFunctionrecordPrevoutMisses
(txn *sql.Tx, misses []*prevoutMiss)
db/postgres.go:1061
↓ 1 callersFunctionresetTableStorageParams
(db *sql.DB)
db/postgres.go:1225
next →1–100 of 167, ranked by callers