Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
feat(BUX-250): tests removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-4chain authored and arkadiuszos4chain committed Nov 13, 2023
1 parent 4307026 commit 989dd4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 214 deletions.
2 changes: 1 addition & 1 deletion model_bump.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type BUMP struct {
// BUMPLeaf represents each BUMP path element
type BUMPLeaf struct {
Offset uint64 `json:"offset,string"`
Hash string `json:"hash"`
Hash string `json:"hash,omitempty"`
TxID bool `json:"txid,omitempty"`
Duplicate bool `json:"duplicate,omitempty"`
}
Expand Down
213 changes: 0 additions & 213 deletions model_bump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,219 +106,6 @@ func TestBUMPModel_CalculateBUMP(t *testing.T) {
assert.Equal(t, expectedBUMP, bump)
})

// Cannot test unless we get real BUMPs - Merkle Proofs don't match in these examples
// For test on real data look at the last test in this file.
// t.Run("Slice of BUMPS", func(t *testing.T) {
// // given
// bumps := []BUMP{
// {
// BlockHeight: 0,
// Path: [][]BUMPLeaf{
// {
// {
// Offset: 2,
// Hash: "123b",
// TxID: true,
// },
// {
// Offset: 3,
// Hash: "123b04",
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b0102",
// },
// },
// {
// {
// Offset: 1,
// Hash: "123b05060708",
// },
// },
// {
// {
// Offset: 1,
// Hash: "123b0910111213141516",
// },
// },
// },
// },
// {
// BlockHeight: 0,
// Path: [][]BUMPLeaf{
// {
// {
// Offset: 6,
// Hash: "123b07",
// },
// {
// Offset: 7,
// Hash: "456b",
// TxID: true,
// },
// },
// {
// {
// Offset: 2,
// Hash: "123b0506",
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b01020304",
// },
// },
// {
// {
// Offset: 1,
// Hash: "123b0910111213141516",
// },
// },
// },
// },
// {
// BlockHeight: 0,
// Path: [][]BUMPLeaf{
// {
// {
// Offset: 12,
// Hash: "123b13",
// },
// {
// Offset: 13,
// Hash: "789b",
// TxID: true,
// },
// },
// {
// {
// Offset: 7,
// Hash: "123b1516",
// },
// },
// {
// {
// Offset: 2,
// Hash: "123b09101112",
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b0102030405060708",
// },
// },
// },
// },
// }
// expectedBUMP := &BUMP{
// BlockHeight: 0,
// Path: [][]BUMPLeaf{
// {
// {
// Offset: 2,
// Hash: "123b",
// TxID: true,
// },
// {
// Offset: 3,
// Hash: "123b04",
// },
// {
// Offset: 6,
// Hash: "123b07",
// },
// {
// Offset: 7,
// Hash: "456b",
// TxID: true,
// },
// {
// Offset: 12,
// Hash: "123b13",
// },
// {
// Offset: 13,
// Hash: "789b",
// TxID: true,
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b0102",
// },
// {
// Offset: 2,
// Hash: "123b0506",
// },
// {
// Offset: 7,
// Hash: "123b1516",
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b01020304",
// },
// {
// Offset: 1,
// Hash: "123b05060708",
// },
// {
// Offset: 2,
// Hash: "123b09101112",
// },
// },
// {
// {
// Offset: 0,
// Hash: "123b0102030405060708",
// },
// {
// Offset: 1,
// Hash: "123b0910111213141516",
// },
// },
// },
// allNodes: []map[uint64]bool{
// {
// 2: true,
// 3: true,
// 6: true,
// 7: true,
// 12: true,
// 13: true,
// },
// {
// 0: true,
// 2: true,
// 7: true,
// },
// {
// 0: true,
// 1: true,
// 2: true,
// },
// {
// 0: true,
// 1: true,
// },
// },
// }
//
// // when
// bump, err := CalculateMergedBUMP(bumps)
//
// // then
// assert.NoError(t, err)
// assert.Equal(t, expectedBUMP, bump)
// })

t.Run("Paired Transactions", func(t *testing.T) {
// given
bumps := []BUMP{
Expand Down

0 comments on commit 989dd4c

Please sign in to comment.