Skip to content

Commit 91940e2

Browse files
authored
Added segwit addresses to indexer. (#215)
If the transaction is a segwit, return the address.
1 parent 0f51e7d commit 91940e2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Blockcore/Consensus/ScriptAddressReader.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ public string GetAddressFromScriptPubKey(Network network, Script script)
2727
case TxOutType.TX_SCRIPTHASH:
2828
destinationAddress = script.GetDestinationAddress(network).ToString();
2929
break;
30+
case TxOutType.TX_SEGWIT:
31+
destinationAddress = script.GetDestinationAddress(network).ToString();
32+
break;
3033
case TxOutType.TX_NONSTANDARD:
3134
case TxOutType.TX_MULTISIG:
3235
case TxOutType.TX_NULL_DATA:
33-
case TxOutType.TX_SEGWIT:
3436
break;
3537
}
3638

3739
return destinationAddress;
3840
}
3941
}
40-
}
42+
}

0 commit comments

Comments
 (0)