File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
node/src/actors/chain_manager Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -1303,25 +1303,17 @@ impl Handler<BuildScriptTransaction> for ChainManager {
13031303 Box :: pin ( actix:: fut:: err ( e. into ( ) ) )
13041304 }
13051305 Ok ( vtt) => {
1306- let fut = signature_mngr:: sign_transaction ( & vtt, vtt. inputs . len ( ) )
1307- . into_actor ( self )
1308- . then ( |s, _act, _ctx| match s {
1309- Ok ( _signatures) => {
1310- let multi_sig_witness = witnet_stack:: encode ( vec ! [ ] ) . unwrap ( ) ;
1311- let num_inputs = vtt. inputs . len ( ) ;
1312- let transaction = Transaction :: ValueTransfer ( VTTransaction {
1313- body : vtt,
1314- witness : vec ! [ multi_sig_witness; num_inputs] ,
1315- } ) ;
1316- actix:: fut:: result ( Ok ( transaction) )
1317- }
1318- Err ( e) => {
1319- log:: error!( "Failed to sign value transfer transaction: {}" , e) ;
1320- actix:: fut:: result ( Err ( e) )
1321- }
1322- } ) ;
1306+ // Script transactions are not signed by this method because the witness may need
1307+ // something more aside from a single signature, so script transactions need to be
1308+ // manually signed using other methods.
1309+ let empty_witness = witnet_stack:: encode ( vec ! [ ] ) . unwrap ( ) ;
1310+ let num_inputs = vtt. inputs . len ( ) ;
1311+ let transaction = Transaction :: ValueTransfer ( VTTransaction {
1312+ body : vtt,
1313+ witness : vec ! [ empty_witness; num_inputs] ,
1314+ } ) ;
13231315
1324- Box :: pin ( fut)
1316+ Box :: pin ( actix :: fut:: result ( Ok ( transaction ) ) )
13251317 }
13261318 }
13271319 }
You can’t perform that action at this time.
0 commit comments