mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-04-30 12:41:59 +08:00
fix: rename value to amount
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
type OutPointBalance struct {
|
||||
PkScript []byte
|
||||
Id runes.RuneId
|
||||
Value uint128.Uint128
|
||||
Amount uint128.Uint128
|
||||
Index uint32
|
||||
PrevTxHash chainhash.Hash
|
||||
PrevTxOutIndex uint32
|
||||
|
||||
@@ -238,7 +238,7 @@ func mapRuneEntryTypeToParams(src runes.RuneEntry, blockHeight uint64) (gen.Crea
|
||||
type outpointBalanceModel struct {
|
||||
PkScript string
|
||||
Id runes.RuneId
|
||||
Value uint128.Uint128
|
||||
Amount uint128.Uint128
|
||||
Index uint32
|
||||
PrevTxHash string
|
||||
PrevTxOutIndex uint32
|
||||
@@ -248,7 +248,7 @@ func mapOutPointBalanceTypeToModel(src entity.OutPointBalance) outpointBalanceMo
|
||||
return outpointBalanceModel{
|
||||
PkScript: hex.EncodeToString(src.PkScript),
|
||||
Id: src.Id,
|
||||
Value: src.Value,
|
||||
Amount: src.Amount,
|
||||
Index: src.Index,
|
||||
PrevTxHash: src.PrevTxHash.String(),
|
||||
PrevTxOutIndex: src.PrevTxOutIndex,
|
||||
@@ -267,7 +267,7 @@ func mapOutPointBalanceModelToType(src outpointBalanceModel) (entity.OutPointBal
|
||||
return entity.OutPointBalance{
|
||||
PkScript: pkScript,
|
||||
Id: src.Id,
|
||||
Value: src.Value,
|
||||
Amount: src.Amount,
|
||||
Index: src.Index,
|
||||
PrevTxHash: *prevTxHash,
|
||||
PrevTxOutIndex: src.PrevTxOutIndex,
|
||||
|
||||
@@ -268,7 +268,7 @@ func (p *Processor) processTx(ctx context.Context, tx *types.Transaction, blockH
|
||||
runeTx.Inputs = append(runeTx.Inputs, &entity.OutPointBalance{
|
||||
PkScript: pkScript,
|
||||
Id: runeId,
|
||||
Value: amount,
|
||||
Amount: amount,
|
||||
Index: uint32(inputIndex),
|
||||
PrevTxHash: tx.TxIn[inputIndex].PreviousOutTxHash,
|
||||
PrevTxOutIndex: tx.TxIn[inputIndex].PreviousOutIndex,
|
||||
@@ -281,7 +281,7 @@ func (p *Processor) processTx(ctx context.Context, tx *types.Transaction, blockH
|
||||
runeTx.Outputs = append(runeTx.Outputs, &entity.OutPointBalance{
|
||||
PkScript: pkScript,
|
||||
Id: runeId,
|
||||
Value: amount,
|
||||
Amount: amount,
|
||||
Index: uint32(outputIndex),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user