Skip to content

Commit

Permalink
Merge pull request #960 from FactomProject/develop
Browse files Browse the repository at this point in the history
Release v6.5.1 (codenamed A4)
  • Loading branch information
PaulSnow authored Jan 27, 2020
2 parents 7acb7ff + 5c26b4d commit c0f29f1
Show file tree
Hide file tree
Showing 251 changed files with 26,995 additions and 3,460 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
command: |
export PATH="/tmp/go/bin:$PATH"
export GOPATH=/tmp/go
export GOROOT=/usr/local/go
cd /tmp/go/src/github.com/FactomProject/factomd/
./test.sh short
test_full:
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ _testmain.go
# Vendoring
vendor/
.sim
recovery
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
6.5.1
12 changes: 11 additions & 1 deletion activations/activationHeight.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const (
_ ActivationType = iota // 0 Don't use ZERO
TESTNET_COINBASE_PERIOD = iota // 1 -- this is a passing activation and this ID may be reused once that height is passes and the references are removed
//
ACTIVATION_TYPE_COUNT = iota - 1 // Always Last
AUTHRORITY_SET_MAX_DELTA = iota
ACTIVATION_TYPE_COUNT = iota - 1 // Always Last
)

type Activation struct {
Expand Down Expand Up @@ -44,6 +45,15 @@ func init() {
"CUSTOM:fct_community_test": 45335, // Monday morning September 17
},
},
Activation{"AuthorityMaxDelta", AUTHRORITY_SET_MAX_DELTA,
"Ensures fewer than half of federated notes are replaced in a single election",
math.MaxInt32, // inactive unless overridden below
map[string]int{
"MAIN": 222874,
"LOCAL": 25,
"CUSTOM:fct_community_test": 109387,
},
},
}

if ACTIVATION_TYPE_COUNT != len(activations) {
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryAddAuditServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -139,12 +138,7 @@ func (e *AddAuditServer) Interpret() string {
}

func (e *AddAuditServer) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddAuditServer.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddAuditServer.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryAddEfficiency.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -44,12 +43,7 @@ func (a *AddEfficiency) IsSameAs(b *AddEfficiency) bool {
}

func (e *AddEfficiency) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddEfficiency.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddEfficiency.SortedIdentity") }()

return e.IdentityChainID
}
Expand Down Expand Up @@ -207,12 +201,7 @@ func (e *AddEfficiency) Interpret() string {
}

func (e *AddEfficiency) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddEfficiency.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddEfficiency.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryAddFactoidAddress.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/factoid"
Expand Down Expand Up @@ -79,12 +78,7 @@ func (e *AddFactoidAddress) Type() byte {
}

func (e *AddFactoidAddress) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFactoidAddress.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFactoidAddress.SortedIdentity") }()

return e.IdentityChainID
}
Expand Down Expand Up @@ -208,12 +202,7 @@ func (e *AddFactoidAddress) Interpret() string {
}

func (e *AddFactoidAddress) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFactoidAddress.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFactoidAddress.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryAddFederatedServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -138,12 +137,7 @@ func (e *AddFederatedServer) Interpret() string {
}

func (e *AddFederatedServer) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFederatedServer.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFederatedServer.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryAddFederatedServerBitcoinAnchorKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand All @@ -30,12 +29,7 @@ func (e *AddFederatedServerBitcoinAnchorKey) Init() {
}

func (e *AddFederatedServerBitcoinAnchorKey) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFederatedServerBitcoinAnchorKey.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFederatedServerBitcoinAnchorKey.SortedIdentity") }()

return e.IdentityChainID
}
Expand Down Expand Up @@ -161,12 +155,7 @@ func (e *AddFederatedServerBitcoinAnchorKey) Interpret() string {
}

func (e *AddFederatedServerBitcoinAnchorKey) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFederatedServerBitcoinAnchorKey.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFederatedServerBitcoinAnchorKey.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryAddFederatedServerSigningKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -36,12 +35,7 @@ func (c *AddFederatedServerSigningKey) UpdateState(state interfaces.IState) erro
}

func (e *AddFederatedServerSigningKey) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFederatedServerSigningKey.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFederatedServerSigningKey.SortedIdentity") }()

return e.IdentityChainID
}
Expand Down Expand Up @@ -154,12 +148,7 @@ func (e *AddFederatedServerSigningKey) Interpret() string {
}

func (e *AddFederatedServerSigningKey) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddFederatedServerSigningKey.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddFederatedServerSigningKey.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryAddReplaceMatryoshkaHash.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -58,12 +57,7 @@ func NewAddReplaceMatryoshkaHash(identityChainID interfaces.IHash, mHash interfa
}

func (e *AddReplaceMatryoshkaHash) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddReplaceMatryoshkaHash.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddReplaceMatryoshkaHash.SortedIdentity") }()

return e.IdentityChainID
}
Expand Down Expand Up @@ -141,12 +135,7 @@ func (e *AddReplaceMatryoshkaHash) Interpret() string {
}

func (e *AddReplaceMatryoshkaHash) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("AddReplaceMatryoshkaHash.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "AddReplaceMatryoshkaHash.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
15 changes: 2 additions & 13 deletions common/adminBlock/EntryCancelCoinbaseDescriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package adminBlock

import (
"fmt"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -72,12 +71,7 @@ func (e *CancelCoinbaseDescriptor) Type() byte {

// SortedIdentity has no identity to sort by, so we will just use the hash of the cancel.
func (e *CancelCoinbaseDescriptor) SortedIdentity() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("CancelCoinbaseDescriptor.SortedIdentity() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "CancelCoinbaseDescriptor.SortedIdentity") }()

return e.Hash()
}
Expand Down Expand Up @@ -202,12 +196,7 @@ func (e *CancelCoinbaseDescriptor) Interpret() string {
}

func (e *CancelCoinbaseDescriptor) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("CancelCoinbaseDescriptor.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "CancelCoinbaseDescriptor.Hash") }()

if e.hash == nil {
bin, err := e.MarshalBinary()
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryCoinbaseDescriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/factoid"
Expand Down Expand Up @@ -179,12 +178,7 @@ func (e *CoinbaseDescriptor) Interpret() string {
}

func (e *CoinbaseDescriptor) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("CoinbaseDescriptor.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "CoinbaseDescriptor.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryDBSignature.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -140,12 +139,7 @@ func (e *DBSignatureEntry) Interpret() string {
}

func (e *DBSignatureEntry) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("DBSignatureEntry.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "DBSignatureEntry.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryEndOfMinute.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -103,12 +102,7 @@ func (e *EndOfMinuteEntry) Interpret() string {
}

func (e *EndOfMinuteEntry) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("EndOfMinuteEntry.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "EndOfMinuteEntry.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
8 changes: 1 addition & 7 deletions common/adminBlock/EntryIncreaseServerCount.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package adminBlock
import (
"fmt"
"os"
"reflect"

"github.com/FactomProject/factomd/common/constants"
"github.com/FactomProject/factomd/common/interfaces"
Expand Down Expand Up @@ -103,12 +102,7 @@ func (e *IncreaseServerCount) Interpret() string {
}

func (e *IncreaseServerCount) Hash() (rval interfaces.IHash) {
defer func() {
if rval != nil && reflect.ValueOf(rval).IsNil() {
rval = nil // convert an interface that is nil to a nil interface
primitives.LogNilHashBug("IncreaseServerCount.Hash() saw an interface that was nil")
}
}()
defer func() { rval = primitives.CheckNil(rval, "IncreaseServerCount.Hash") }()

bin, err := e.MarshalBinary()
if err != nil {
Expand Down
Loading

0 comments on commit c0f29f1

Please sign in to comment.