lbcwallet/txstore
Josh Rickmar 242cb22719 Check every error.
This change is the result of using the errcheck tool
(https://github.com/kisielk/errcheck) to find all unchecked errors,
both unassigned and those assigned to the blank identifier.

Every returned error is now handled in some manner.  These include:

  - Logging errors that would otherwise be missed
  - Returning errors to the caller for further processing
  - Checking error values to determine what to do next
  - Panicking for truely exceptional "impossible" errors

On the subject of panics, they are a sharp tool and should be used
sparingly.  That being said, I have added them to check errors that
were previously explicitly ignored, because they were expected to
always return without failure.  This could be due to fake error paths
(i.e. writing to a bytes.Buffer panics for OOM and should never return
an error) or previous logic asserts that an error case is impossible.
Rather than leaving these unhandled and letting code fail later,
either with incorrect results or a nil pointer dereference, it now
produces a stack trace at the error emit site, which I find far more
useful when debugging.

While here, a bunch of dead code was removed, including code to move
pre-0.1.1 uxto and transaction history account files to the new
directory (as they would be unreadable anyways) and a big chunk of
commented out rpcclient code.
2014-05-28 00:10:35 -05:00
..
doc.go go fmt. 2014-05-20 20:09:33 -05:00
fixedIO_test.go Rename tx package to txstore. 2014-05-08 14:51:33 -05:00
json.go Updates for btcutil and btcscript's btcnet conversion. 2014-05-27 17:49:36 -05:00
serialization.go Check every error. 2014-05-28 00:10:35 -05:00
tx.go Updates for btcutil and btcscript's btcnet conversion. 2014-05-27 17:49:36 -05:00
tx_test.go Updates for btcutil and btcscript's btcnet conversion. 2014-05-27 17:49:36 -05:00