1. 05 Feb, 2017 1 commit
  2. 19 Nov, 2016 1 commit
  3. 07 May, 2016 1 commit
  4. 04 May, 2016 1 commit
  5. 01 Feb, 2016 3 commits
    • 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.
    • 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.
    • 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
  6. 22 Sep, 2015 1 commit
  7. 21 Sep, 2015 1 commit
  8. 12 Sep, 2015 1 commit
    • 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.
  9. 11 Sep, 2015 1 commit
    • 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.
  10. 25 Aug, 2015 1 commit
    • 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.
  11. 02 Aug, 2015 1 commit
  12. 07 Jul, 2015 1 commit
  13. 04 Apr, 2015 2 commits
  14. 03 Apr, 2015 1 commit
  15. 02 Apr, 2015 3 commits