return gas
}
-func (m *Manager) reserveBtmUtxoChain(builder *txbuilder.TemplateBuilder, accountID string, amount uint64, useUnconfirmed bool) ([]*UTXO, error) {
+func (m *Manager) ReserveBtmUtxoChain(builder *txbuilder.TemplateBuilder, accountID string, amount uint64, useUnconfirmed bool) ([]*UTXO, error) {
reservedAmount := uint64(0)
utxos := []*UTXO{}
for gasAmount := uint64(0); reservedAmount < gasAmount+amount; gasAmount = CalcMergeGas(len(utxos)) {
return utxos, nil
}
-func (m *Manager) buildBtmTxChain(utxos []*UTXO, signer *signers.Signer) ([]*txbuilder.Template, *UTXO, error) {
+func (m *Manager) BuildBtmTxChain(utxos []*UTXO, signer *signers.Signer) ([]*txbuilder.Template, *UTXO, error) {
if len(utxos) == 0 {
return nil, nil, errors.New("mergeSpendActionUTXO utxos num 0")
}
return nil, errors.New("spend chain action only support BTM")
}
- utxos, err := act.accounts.reserveBtmUtxoChain(builder, act.AccountID, act.Amount, act.UseUnconfirmed)
+ utxos, err := act.accounts.ReserveBtmUtxoChain(builder, act.AccountID, act.Amount, act.UseUnconfirmed)
if err != nil {
return nil, err
}
return nil, err
}
- tpls, utxo, err := act.accounts.buildBtmTxChain(utxos, acct.Signer)
+ tpls, utxo, err := act.accounts.BuildBtmTxChain(utxos, acct.Signer)
if err != nil {
return nil, err
}