Skip to content

Commit 9f203a5

Browse files
authored
chore(docs): add more clarity to what StateMinerAvailableBalance is doing (#13045)
1 parent 54ec502 commit 9f203a5

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

api/api_full.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,11 @@ type FullNode interface {
460460
// Note: The value returned is overestimated by 10% (multiplied by 110/100).
461461
// See: node/impl/full/state.go StateMinerInitialPledgeForSector implementation.
462462
StateMinerInitialPledgeForSector(ctx context.Context, sectorDuration abi.ChainEpoch, sectorSize abi.SectorSize, verifiedSize uint64, tsk types.TipSetKey) (types.BigInt, error) //perm:read
463-
// StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent
463+
// StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or
464+
// spent. It is calculated by subtracting the following from the miner actor's balance:
465+
// * Locked vesting funds (accounting for vesting funds that should already be unlocked)
466+
// * PreCommit deposits
467+
// * Initial pledge collateral
464468
StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) //perm:read
465469
// StateMinerSectorAllocated checks if a sector number is marked as allocated.
466470
StateMinerSectorAllocated(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (bool, error) //perm:read

build/openrpc/full.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documentation/en/api-v1-unstable-methods.md

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)