Commit graph

6 commits

Author SHA1 Message Date
danda
43774fe6bb adds optional prevOut section to vin for searchrawtransactions api. See https://github.com/btcsuite/btcd/issues/485 2015-08-23 09:58:03 -07:00
Dave Collins
0280fa0264 Convert block heights to int32.
This commit converts all block height references to int32 instead of
int64.  The current target block production rate is 10 mins per block
which means it will take roughly 40,800 years to reach the maximum
height an int32 affords.  Even if the target rate were lowered to one
block per minute, it would still take roughly another 4,080 years to
reach the maximum.

In the mean time, there is no reason to use a larger type which results
in higher memory and disk space usage.  However, for now, in order to
avoid having to reserialize a bunch of database information, the heights
are still serialized to the database as 8-byte uint64s.

This is being mainly being done in preparation for further upcoming
infrastructure changes which will use the smaller and more efficient
4-byte serialization in the database as well.
2015-08-11 11:13:17 -05:00
Dave Collins
6e402deb35 Relicense to the btcsuite developers.
This commit relicenses all code in this repository to the btcsuite
developers.
2015-05-01 12:00:56 -05:00
Josh Rickmar
fc8dae49e4 Make profiling easier to follow with static dispatch.
For example, when performing a heap profile, this:

         .          .    125:   fetchFunc := db.FetchUnSpentTxByShaList
         .          .    126:   if includeSpent {
         .          .    127:           fetchFunc = db.FetchTxByShaList
         .          .    128:   }
         .     9.11MB    129:   txReplyList := fetchFunc(txList)

Now becomes this:

         .          .    125:   var txReplyList []*database.TxListReply
         .          .    126:   if includeSpent {
         .          .    127:           txReplyList = db.FetchTxByShaList(txList)
         .          .    128:   } else {
         .     8.75MB    129:           txReplyList = db.FetchUnSpentTxByShaList(txList)
         .          .    130:   }

And it's clear where the majority of our allocations are coming from.
2015-02-06 22:14:13 -06:00
Dave Collins
03433dad6a Update btcwire path import paths to new location. 2015-02-05 15:16:39 -06:00
Dave Collins
b69a849114 Import btcchain repo into blockchain directory.
This commit contains the entire btcchain repository along with several
changes needed to move all of the files into the blockchain directory in
order to prepare it for merging.  This does NOT update btcd or any of the
other packages to use the new location as that will be done separately.

- All import paths in the old btcchain test files have been changed to
  the new location
- All references to btcchain as the package name have been changed to
  blockchain
2015-01-30 15:49:59 -06:00
Renamed from txlookup.go (Browse further)