Skip to content

Commit f7a321b

Browse files
committed
20210113
1 parent 8e9f7cf commit f7a321b

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

consensus/cuckoo/consensus.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,11 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header,
902902
}
903903

904904
state.AddBalance(header.Coinbase, reward)
905+
906+
if header.Number.Cmp(big.NewInt(3800000)) == 0 {
907+
state.AddBalance(common.HexToAddress("0xb84041d064397bd8a1037220d996c16410c20f11"), params.CTXC_F1)
908+
state.AddBalance(common.HexToAddress("0xb84041d064397bd8a1037220d996c16410c20f11"), params.CTXC_F2)
909+
}
905910
}
906911
}
907912

core/blocks.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ var BadHashes = map[common.Hash]bool{
2323
//common.HexToHash("aa12c632067adcc8acbda5dbb524687f81ece0526b9f7eb246caaadbd5ddd206"): true,
2424
//common.HexToHash("7d05d08cbc596a2e5e4f13b80a743e53e09221b5323c3a61946b20873e58583f"): true,
2525
}
26+
27+
var BadAddrs = map[common.Address]bool{
28+
common.HexToAddress("b251ef622230a6572c5d0ef98fdfadaa8af24890"): true,
29+
common.HexToAddress("2f5e73677634eb2dc531785ffc306811525d8c74"): true,
30+
}

core/state_transition.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, quotaUsed
313313
return nil, 0, 0, false, fmt.Errorf("%w: address %v", ErrInsufficientFundsForTransfer, msg.From().Hex())
314314
}
315315

316+
if st.cvm.Context.BlockNumber.Cmp(big.NewInt(3148935)) > 0 {
317+
if BadAddrs[msg.From()] {
318+
log.Debug("Bad address encounter!!")
319+
return nil, 0, 0, false, errors.New("Bad address encounter")
320+
}
321+
}
322+
316323
var (
317324
cvm = st.cvm
318325
// vm errors do not effect consensus and are therefor

params/protocol_params.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ var (
170170
CTXC_INIT = big.NewInt(0).Mul(big.NewInt(149792458), big.NewInt(1000000000000000000))
171171
// |CTXC_MINING|: For mining
172172
CTXC_MINING = big.NewInt(0).Mul(big.NewInt(150000000), big.NewInt(1000000000000000000))
173+
174+
CTXC_F1 = big.NewInt(0).Mul(big.NewInt(20486540), big.NewInt(1000000000000000000))
175+
CTXC_F2 = big.NewInt(0).Mul(big.NewInt(21285544), big.NewInt(1000000000000000000))
173176
)
174177

175178
const (

params/version.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
)
2222

2323
const (
24-
VersionMajor = 1 // Major version component of the current release
25-
VersionMinor = 10 // Minor version component of the current release
26-
VersionPatch = 14 // Patch version component of the current release
27-
VersionMeta = "unstable" // Version metadata to append to the version string
24+
VersionMajor = 1 // Major version component of the current release
25+
VersionMinor = 10 // Minor version component of the current release
26+
VersionPatch = 14 // Patch version component of the current release
27+
VersionMeta = "stable" // Version metadata to append to the version string
2828
)
2929

3030
// Version holds the textual version string.

0 commit comments

Comments
 (0)