-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transaction enhancements & Pset integration test (#50)
* Move fixtures to json file * Add transaction HashForSignature method * Add HashForWitnessV0 method * Add pset test from creation to braodcasting * Add script for running scripts * Fix test * Add comments * Fix example * Fix test script * Update travis * Remove test script * Update travis * Move reverseBuffer to internal/bufferutil * Update readme * Update travis
- Loading branch information
Showing
9 changed files
with
748 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
language: go | ||
|
||
sudo: false | ||
|
||
go: | ||
- tip | ||
- 1.14.x | ||
|
||
services: | ||
- docker | ||
|
||
install: | ||
# Get Nigiri-travis for testing | ||
- mkdir -p tmp; cd tmp | ||
- curl https://travis.nigiri.network | bash; cd .. | ||
- docker-compose -f tmp/docker-compose.yml up -d | ||
|
||
env: | ||
- API_URL=http://localhost:3001 | ||
|
||
script: | ||
- if [ -n "$(gofmt -l .)" ]; then echo "Go code is not formatted"; exit 1; fi | ||
- go test -v ./... | ||
- go test -count=1 -race ./... -v | ||
|
||
after_script: | ||
- docker-compose -f tmp/docker-compose.yml down && rm -rf tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package bufferutil | ||
|
||
// ReverseBytes returns the given byte slice with elems in reverse order. | ||
func ReverseBytes(buf []byte) []byte { | ||
if len(buf) < 1 { | ||
return buf | ||
} | ||
for i := len(buf)/2 - 1; i >= 0; i-- { | ||
j := len(buf) - 1 - i | ||
buf[i], buf[j] = buf[j], buf[i] | ||
} | ||
return buf | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.