@@ -16,6 +16,7 @@ export interface ControllerConfiguration {
1616  readonly  poetVersion : number 
1717  readonly  maximumTransactionAgeInBlocks : number 
1818  readonly  bitcoinFeeEstimateMode : 'CONSERVATIVE'  |  'ECONOMICAL' 
19+   readonly  bitcoinFeeRate : number 
1920} 
2021
2122export  const  convertLightBlockToEntry  =  ( lightBlock : LightBlock ) : Entry  =>  ( { 
@@ -149,6 +150,7 @@ export class Controller {
149150
150151  private  anchorData  =  async  ( data : string )  =>  { 
151152    const  {  bitcoinCore }  =  this 
153+     const  {  bitcoinFeeEstimateMode,  bitcoinFeeRate }  =  this . configuration 
152154    const  logger  =  this . logger . child ( {  method : 'anchorData'  } ) 
153155
154156    const  rawTransaction  =  await  bitcoinCore . createRawTransaction ( [ ] ,  {  data } ) 
@@ -160,14 +162,20 @@ export class Controller {
160162      'Got rawTransaction from Bitcoin Core' , 
161163    ) 
162164
165+     const  fundRawTransactionOptions  =  { 
166+       estimate_mode : bitcoinFeeRate  ===  undefined  ? bitcoinFeeEstimateMode  : undefined , 
167+       feeRate : bitcoinFeeRate , 
168+     } 
169+ 
163170    const  fundedTransaction  =  await  bitcoinCore . fundRawTransaction ( 
164171      rawTransaction , 
165-       {   estimate_mode :  this . configuration . bitcoinFeeEstimateMode   } , 
172+       fundRawTransactionOptions , 
166173    ) . catch ( translateFundTransactionError ) 
167174
168175    logger . trace ( 
169176      { 
170177        fundedTransaction, 
178+         fundRawTransactionOptions, 
171179      } , 
172180      'Got fundedTransaction from Bitcoin Core' , 
173181    ) 
0 commit comments