Skip to content

Commit

Permalink
Merge pull request #25 from bttcprotocol/release_1.0.2
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
zhang0125 authored Sep 8, 2022
2 parents d07c458 + 8e497f8 commit fb5e133
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (

const (
clientIdentifier = "bor" // Client identifier to advertise over the network
repositoryIdentifier = "go-bor"
repositoryIdentifier = "go-bttc"
)

var (
Expand Down
4 changes: 3 additions & 1 deletion consensus/bor/bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const (
checkpointInterval = 1024 // Number of blocks after which to save the vote snapshot to the database
inmemorySnapshots = 128 // Number of recent vote snapshots to keep in memory
inmemorySignatures = 4096 // Number of recent block signatures to keep in memory

allowFutureBlockTimeSeconds = int64(3) // Max seconds from current time to allow for blocks before they are considered as future blocks
)

// Bor protocol constants.
Expand Down Expand Up @@ -320,7 +322,7 @@ func (c *Bor) verifyHeader(chain consensus.ChainHeaderReader, header *types.Head
number := header.Number.Uint64()

// Don't waste time checking blocks from the future
if header.Time > uint64(time.Now().Unix()) {
if header.Time > uint64(time.Now().Unix()+allowFutureBlockTimeSeconds) {
return consensus.ErrFutureBlock
}

Expand Down
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func makeExtraData(extra []byte) []byte {
// create default extradata
extra, _ = rlp.EncodeToBytes([]interface{}{
uint(params.VersionMajor<<16 | params.VersionMinor<<8 | params.VersionPatch),
"bor",
"bttc",
runtime.Version(),
runtime.GOOS,
})
Expand Down
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ func (s *PublicBlockChainAPI) GetTransactionReceiptsByBlock(ctx context.Context,
if receipt.Logs == nil {
fields["logs"] = [][]*types.Log{}
}
if borReceipt != nil {
if borReceipt != nil && idx == len(receipts)-1 {
fields["transactionHash"] = txHash
}
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 0 // Minor version component of the current release
VersionPatch = 1 // Patch version component of the current release
VersionPatch = 2 // Patch version component of the current release
VersionMeta = "stable" // Version metadata to append to the version string
)

Expand Down

0 comments on commit fb5e133

Please sign in to comment.