Skip to content
Snippets Groups Projects
Select Git revision
  • 869f4dd1ceefb410accfc9844df4c49889053547
  • develop default protected
  • congestioncontrol
  • merge-v-data-collection-spammer-0.8.2
  • WIP-merge-v-data-collection-spammer-0.8.2
  • merge-v-data-collection-spammer-0.7.7
  • tmp
  • test-masterpow-fixing
  • test-masterpow
  • test-echo
  • v-data-collection
  • v-data-collection-spammer
  • tmp-dump-spam-info
  • dump-msg-info-0.3.1
  • test-dump-message-info
  • spammer-exprandom
  • extra/tutorial
  • without_tipselection
  • hacking-docker-network
  • hacking-docker-network-0.2.3
  • master
  • v0.2.3
22 results

attachment_test.go

Blame
  • user avatar
    Jonas Theis authored and GitHub committed
    * Feat: initial commit
    
    * Feat: added setPreferred to TransactionMetadata
    
    * Feat: added a Conflicting() method to the transactionMetadata
    
    * Fix: fixed logic bug
    
    * Feat: refactored fcob
    
    * Refactor: refactored additional code
    
    * Fix: fixed a bug in ForeachConsumers
    
    * Refactor: cleaned up code
    
    * Feat: implemented FCOB consensus into the valuetransfer dapp
    
    * Refactor: refactored FCOB
    
    * Docs: added some additional comments
    
    * Docs: fixed comments
    
    * add branch manager conflict test
    
    * cleans failing test
    
    * Refactor: commit before branch change
    
    * Fix: fixed bug in AggregateBranches
    
    * assert aggr. branch IDs
    
    * expands branch conflict detection test
    
    * add visualisation of branch graph of test
    
    * Feat: added PayloadLiked Event
    
    * Refactor: fixed some missing comments + added liked to marshal
    
    * Feat: reworked the preferred and liked propagation
    
    * Refactor: cleaned up some logic
    
    * Refactor: simplified code
    
    * Refactor: cleaned up more stuff :P
    
    * Refactor: refactor
    
    * Feat: moved test + refactored fcob
    
    * adds more tests
    
    * fixes liked state not getting updated correctly of conflict members
    
    * adds additional liked/preferred propagation test
    
    * Fix: fixed missing preferred propagation to aggregated branches
    
    * Fix: fixed a few bugs in liked propagation
    
    * adapt to new hive.go version
    
    * upgrade hive.go
    
    * Feat: started implementing a wallet
    
    * Feat: extended wallet files
    
    * remove weird test
    
    * use mem db for tests
    
    * more tests
    
    * use store backed sequence
    
    * add option to use in-memory database
    
    * address review comments
    
    * First tests for individual components of AttachPayloadSync
    
    * Fix: fixed missing events in branchmanaer
    
    * Feat: propagate changes from branch to transaction
    
    * Add tests for checkTransactionOutputs
    
    * Feat: started implementing confirmed propagation
    
    * Fix: fixed unreachable code
    
    * Add more tests
    
    * Refactor: refactored some code according to wolfgangs review
    
    * Refactor: cleaned up the code according to DRY
    
    * Refactor: refactored according to wollac
    
    * Refactor: refactored according to wollac
    
    * Refactor: refactored according to wollac
    
    * Refactor: refactored the code to make it more readable
    
    * Refactor: added some doc comments + cleaned up some more code
    
    * :white_check_mark: adds orderedMap unit tests
    
    * :rotating_light: Fix linter warnings
    
    * test: Add queue unit tests
    
    * Add more tests
    
    * :lipstick: Adjust imports order
    
    * WIP more tests
    
    * :white_check_mark: Add TestBookTransaction
    
    * :white_check_mark: Update TestBookTransaction
    
    * Add more tests
    
    * :construction: WIP tests
    
    * :white_check_mark: Add TestCalculateBranchOfTransaction
    
    * :white_check_mark: Add TestMoveTransactionToBranch
    
    * :white_check_mark: Add TestFork
    
    * :white_check_mark: Add TestBookPayload
    
    * Add test for checkPayloadSolidity
    
    * :white_check_mark: Add TestSetTransactionPreferred
    
    * Add more tests
    
    * :white_check_mark: Fix Tangle test
    
    * Feat: started implementing lucas test cases
    
    * Feat: fixed some issued + further tests
    
    * Feat: started adding invalid txs check
    
    * Feat: added removal logic for invalid transactions
    
    * Refactor: removed Println
    
    * :white_check_mark: Add test for 2nd Reattachment
    
    * :white_check_mark: Add aggregated branches test cases
    
    * Feat: added a method to generate AggregatedBranchIDs
    
    * :art: Use GenerateAggregatedBranchID in test
    
    * Feat: refactored delete logic
    
    * Fix: fixed broken test
    
    * Feat: added final test cases for invalid txs / payloads
    
    * :construction:
    
     WIP
    
    * Value tangle concurrency tests (#451)
    
    * Add simple concurrency test
    
    * Add reverse and concurrent transaction and value object solidification tests and fix bug when value object was visited more than once
    
    * Add some documentation to make tests easily understandable
    
    * WIP propagation tests but fixed already couple of bugs
    
    * Fix: fixed some bugs
    
    * Feat: added propagation to inclusion states to tx and its outputs
    
    * Feat: finished the propagation down to the tx and its outputs
    
    * WIP propagation tests and fix bugs
    
    * Feat: fixed some issues and introduced a Debugger
    
    * Refactor: added a few comments
    
    * Split massive test file into slightly more digestible chunks
    
    * Clean up propagation tests
    
    * Feat: fixed bugs
    
    * Feat: enabled missing tests
    
    * Add some documentation and missing checks for aggregated branches
    
    * Clean up tangle tests
    
    * Fix: finalized wasn't propagated when a branch was rejected
    
    * WIP debugging concurrency bug of death
    
    * Feat: added more reliable fails in test case
    
    * Fix: fixes a race condition in solidification
    
    * Clean up test
    
    Co-authored-by: default avatarHans Moog <hm@mkjc.net>
    Co-authored-by: default avatarLuca Moser <moser.luca@gmail.com>
    Co-authored-by: default avatarWolfgang Welz <welzwo@gmail.com>
    Co-authored-by: default avatarcapossele <angelocapossele@gmail.com>
    Co-authored-by: default avatarjkrvivian <jkrvivian@gmail.com>
    ef1754f0
    History
    attachment_test.go 799 B
    package tangle
    
    import (
    	"testing"
    
    	"github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/payload"
    	"github.com/iotaledger/goshimmer/dapps/valuetransfers/packages/transaction"
    	"github.com/stretchr/testify/assert"
    )
    
    func TestAttachment(t *testing.T) {
    	transactionID := transaction.RandomID()
    	payloadID := payload.RandomID()
    
    	attachment := NewAttachment(transactionID, payloadID)
    
    	assert.Equal(t, transactionID, attachment.TransactionID())
    	assert.Equal(t, payloadID, attachment.PayloadID())
    
    	clonedAttachment, consumedBytes, err := AttachmentFromBytes(attachment.Bytes())
    	if err != nil {
    		panic(err)
    	}
    
    	assert.Equal(t, AttachmentLength, consumedBytes)
    	assert.Equal(t, transactionID, clonedAttachment.TransactionID())
    	assert.Equal(t, payloadID, clonedAttachment.PayloadID())
    }