Skip to content

Commit

Permalink
[transactionrecord] - Return this test back for now
Browse files Browse the repository at this point in the history
  • Loading branch information
araujobsd authored and hxw committed Jun 18, 2019
1 parent 1f1406a commit b6a9c6d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions transactionrecord/balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,25 @@ func TestPackShareBalanceValueNotZero(t *testing.T) {
Quantity: 0,
}

expected := []byte{
0x05, 0x20, 0x14, 0xeb, 0x10, 0x3a, 0x0c, 0x8f,
0xb2, 0x2e, 0x50, 0xe7, 0x3a, 0xe9, 0xb4, 0xff,
0x88, 0x59, 0x5b, 0x1c, 0xd5, 0xf6, 0x0c, 0x4a,
0xfb, 0x69, 0x0d, 0x8f, 0xbd, 0x01, 0x4c, 0x3e,
0xd0, 0x91, 0x00, 0x21, 0x13, 0x27, 0x64, 0x0e,
0x4a, 0xab, 0x92, 0xd8, 0x7b, 0x4a, 0x6a, 0x2f,
0x30, 0xb8, 0x81, 0xf4, 0x49, 0x29, 0xf8, 0x66,
0x04, 0x3a, 0x84, 0x1c, 0x38, 0x14, 0xb1, 0x66,
0xb8, 0x89, 0x44, 0xb0, 0x92,
}

// manually sign the record and attach signature to "expected"
signature := ed25519.Sign(ownerTwo.privateKey, expected)
r.Signature = signature
l := util.ToVarint64(uint64(len(signature)))
expected = append(expected, l...)
expected = append(expected, signature...)

// test the packer
_, err = r.Pack(ownerOneAccount)
if fault.ErrShareQuantityTooSmall != err {
Expand Down

0 comments on commit b6a9c6d

Please sign in to comment.