Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: e4c053e5047c1e55d869372cf5fd1362cfad67b1
      
https://github.com/btcsuite/btcd/commit/e4c053e5047c1e55d869372cf5fd1362cfad67b1
  Author: Dave Collins <[email protected]>
  Date:   2015-09-30 (Wed, 30 Sep 2015)

  Changed paths:
    M rpcserver.go

  Log Message:
  -----------
  rpcserver: Optimize JSON raw tx input list create.

This commit optimizes the createVinList function which is used to
generate the JSON list of transaction inputs.  It also makes it more
consistent with the createVinListPrevOut function.

In particular, it entails the following changes:
- Only do a single coinbase check and return right away instead of
  checking multiple times inside the loop over the inputs
- Use a pointer for populating the details of each entry to avoid
  multiple unnecessary array lookups and bounds checks
- Group all fields that populate the entry for better readability


Reply via email to