Skip to content
Snippets Groups Projects
  1. May 07, 2016
  2. Feb 01, 2016
    • David Vorick's avatar
      simplify types.Currency -> uint64 conversion · 5dd288b2
      David Vorick authored
      Also add an extra test case for a number near math.MaxUint64 but not
      full max.
      5dd288b2
    • David Vorick's avatar
      add Uint64() method to types.Currency · 949a4736
      David Vorick authored
      A future commit makes use of this function call. An error is returned if
      there is an overflow. Though a panic could have been called, it is
      believed that this method will be used heavily on currencies that could
      potentially be manipulated by untrusted input. Rather than require that
      all untrusted input be handled to check for currency-overflow causing
      problems, and error is returned by the currency type.
      949a4736
    • David Vorick's avatar
      clean up types/currency.go · 1f0440a4
      David Vorick authored
      switch from DEBUG wrapped panics to calls to build.Critical. Also add
      some docstrings, and make the tests compatible with the calls to
      build.Critical.
      1f0440a4
  3. Sep 12, 2015
    • Luke Champine's avatar
      MarshalSia now takes an io.Writer · c87dde78
      Luke Champine authored
      This makes sense, symmetry-wise, and it also means that we can
      encode large objects (e.g. blocks) to streams without having to
      hold the entire byte slice in memory.
      c87dde78
  4. Sep 11, 2015
    • Luke Champine's avatar
      UnmarshalSia now takes an io.Reader · fe3120a9
      Luke Champine authored
      Previously, types implementing the SiaMarshaler interface would
      be automatically length-prefixed by encode. However, this makes it
      impossible to add Marshal/Unmarshal methods to a type without
      breaking compatibility; many existing types do not begin with a
      length prefix, e.g. structs.
      fe3120a9
  5. Aug 25, 2015
    • Luke Champine's avatar
      marshal Currency as JSON string · f568ec46
      Luke Champine authored
      Previously, the Currency type was marshalled as a JSON number.
      This caused the value to be cast to a double when the JSON was
      parsed by JavaScript.
      f568ec46
  6. Aug 13, 2015
  7. Jul 07, 2015
  8. Apr 04, 2015
  9. Apr 03, 2015
  10. Apr 02, 2015
  11. Mar 08, 2015
  12. Mar 02, 2015
  13. Feb 17, 2015
  14. Feb 10, 2015
  15. Feb 07, 2015
  16. Feb 06, 2015
  17. Feb 05, 2015
  18. Feb 04, 2015
Loading