Skip to content

Commit

Permalink
add datacap balance to circ supply
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Aug 6, 2024
1 parent 9707526 commit f7612d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions chain/actors/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var SystemActorAddr = builtin.SystemActorAddr
var BurntFundsActorAddr = builtin.BurntFundsActorAddr
var CronActorAddr = builtin.CronActorAddr
var EthereumAddressManagerActorAddr = builtin.EthereumAddressManagerActorAddr
var DatacapActorAddr = builtin.DatacapActorAddr
var SaftAddress = makeAddress("t0122")
var ReserveAddress = makeAddress("t090")
var RootVerifierAddress = makeAddress("t080")
Expand Down Expand Up @@ -276,6 +277,15 @@ func IsPaymentChannelActor(c cid.Cid) bool {
return false
}

func IsDatacapActor(c cid.Cid) bool {
name, _, ok := actors.GetActorMetaByCode(c)
if ok {
return name == manifest.DatacapKey
}

return false
}

func IsPlaceholderActor(c cid.Cid) bool {
name, _, ok := actors.GetActorMetaByCode(c)
if ok {
Expand Down
3 changes: 2 additions & 1 deletion chain/stmgr/supply.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ func (sm *StateManager) GetCirculatingSupply(ctx context.Context, height abi.Cha
a == builtin.BurntFundsActorAddr ||
a == builtin.SaftAddress ||
a == builtin.ReserveAddress ||
a == builtin.EthereumAddressManagerActorAddr:
a == builtin.EthereumAddressManagerActorAddr ||
a == builtin.DatacapActorAddr:

Check failure on line 421 in chain/stmgr/supply.go

View workflow job for this annotation

GitHub Actions / Check (docs-check)

undefined: builtin.DatacapActorAddr

Check failure on line 421 in chain/stmgr/supply.go

View workflow job for this annotation

GitHub Actions / Check (gen-check)

undefined: builtin.DatacapActorAddr

unCirc = big.Add(unCirc, actor.Balance)

Expand Down

0 comments on commit f7612d3

Please sign in to comment.