Skip to content

Commit 2d6b3d2

Browse files
authored
Merge pull request #1136 from FactomProject/develop
Develop
2 parents 03688ed + aa38f61 commit 2d6b3d2

File tree

9 files changed

+17
-987
lines changed

9 files changed

+17
-987
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
export PATH="/tmp/go/bin:$PATH"
8787
export GOPATH=/tmp/go
8888
cd /tmp/go/src/github.com/FactomProject/factomd/
89-
go test $(go list ./... | grep -v 'Utilities|longTest|peerTest|simTest') -vet=off -v -cover -coverprofile=coverage.out
89+
go test $( go list ./... | grep -v 'Utilities|longTest|peerTest|simTest') -vet=off -v -cover -coverprofile=coverage.out
9090
goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
9191
9292
gofmt:

Utilities/DatabaseGenerator/blockgen/entrygencore.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ func (r *EntryGenCore) NewEblock(height uint32, time interfaces.Timestamp) (*ent
152152
func (r *EntryGenCore) NewChainHead() *entryBlock.Entry {
153153
head := r.Parent.NewEntry(primitives.NewZeroHash())
154154
// First one needs an extid
155-
head.ExtIDs = []primitives.ByteSlice{primitives.ByteSlice{random.RandByteSliceOfLen(10)},
156-
primitives.ByteSlice{random.RandByteSliceOfLen(10)},
157-
primitives.ByteSlice{random.RandByteSliceOfLen(10)}}
155+
var a, b, c primitives.ByteSlice
156+
a.Bytes = random.RandByteSliceOfLen(10)
157+
b.Bytes = random.RandByteSliceOfLen(10)
158+
c.Bytes = random.RandByteSliceOfLen(10)
159+
head.ExtIDs = []primitives.ByteSlice{a, b, c}
158160
head.ChainID = entryBlock.ExternalIDsToChainID(head.ExternalIDs())
159161
return head
160162
}
@@ -164,7 +166,7 @@ func (r *EntryGenCore) NewEntry(chain interfaces.IHash) *entryBlock.Entry {
164166
bytes := rand.Intn(conf.EntrySize.Amount())
165167

166168
ent := entryBlock.NewEntry()
167-
ent.Content = primitives.ByteSlice{random.RandByteSliceOfLen(bytes)}
169+
ent.Content = primitives.ByteSlice{Bytes: random.RandByteSliceOfLen(bytes)}
168170
ent.ChainID = chain
169171
return ent
170172
}

Utilities/DatabaseGenerator/blockgen/generator.go

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func (g *DBGenerator) loadGenesis() {
124124
customIdentity, err = primitives.HexToHash(g.FactomdState.CustomBootstrapIdentity)
125125
if err != nil {
126126
panic(fmt.Sprintf("Could not decode Custom Bootstrap Identity (likely in config file) found: %s\n", g.FactomdState.CustomBootstrapIdentity))
127-
panic(err)
128127
}
129128
}
130129
dblk, ablk, fblk, ecblk := state.GenerateGenesisBlocks(g.FactomdState.GetNetworkID(), customIdentity)

Utilities/DatabaseGenerator/blockgen/incremententrygen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (r *IncrementEntryGenerator) NewChainHead() *entryBlock.Entry {
4444
func (r *IncrementEntryGenerator) NewEntry(chain interfaces.IHash) *entryBlock.Entry {
4545
ent := entryBlock.NewEntry()
4646
// Putting the ASCII number so you can read in explorer
47-
ent.Content = primitives.ByteSlice{[]byte(fmt.Sprintf("%d", r.currentCount))}
47+
ent.Content = primitives.ByteSlice{Bytes: []byte(fmt.Sprintf("%d", r.currentCount))}
4848
ent.ChainID = chain
4949
r.currentCount++
5050

Utilities/DatabaseGenerator/blockgen/recordentrygen.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ func (r *RecordEntryGenerator) NewEntry(chain interfaces.IHash) *entryBlock.Entr
3232
ent := entryBlock.NewEntry()
3333
// Putting the ASCII number so you can read in explorer
3434
ent.ExtIDs = []primitives.ByteSlice{
35-
primitives.ByteSlice{primitives.RandomHash().Bytes()},
36-
primitives.ByteSlice{primitives.RandomHash().Bytes()},
37-
primitives.ByteSlice{primitives.RandomHash().Bytes()},
38-
primitives.ByteSlice{primitives.RandomHash().Bytes()},
39-
primitives.ByteSlice{primitives.RandomHash().Bytes()},
35+
{Bytes: primitives.RandomHash().Bytes()},
36+
{Bytes: primitives.RandomHash().Bytes()},
37+
{Bytes: primitives.RandomHash().Bytes()},
38+
{Bytes: primitives.RandomHash().Bytes()},
39+
{Bytes: primitives.RandomHash().Bytes()},
4040
}
4141

4242
ent.ChainID = chain

0 commit comments

Comments
 (0)