Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwallet
  Commit: b1a71d5f83d906feb2c96d210e881a74b7a91c60
      
https://github.com/conformal/btcwallet/commit/b1a71d5f83d906feb2c96d210e881a74b7a91c60
  Author: Josh Rickmar <[email protected]>
  Date:   2014-04-09 (Wed, 09 Apr 2014)

  Changed paths:
    M rpc.go
    M rpcclient.go
    M rpcserver.go
    M sockets.go

  Log Message:
  -----------
  Delay JSON unmarshaling until needed.

This change takes advantage of the RawMessage type in the
encoding/json package to defer unmarshaling of all JSON-RPC values
until absolutely necessary.

This is particularly important for request passthrough when btcwallet
must ask btcd to handle a chain request for a wallet client.  In the
previous code, during the marshal and unmarshal dance to set the
original client's request id in the btcd response, large JSON numbers
were being mangled to use (scientific) E notation even when they could
be represented as a integer without any loss of precision.


Reply via email to