Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Fixes wrong docs/comments for validateVout (#159)
Browse files Browse the repository at this point in the history
Docs and some comments for validateVout were copied from validateVin
  • Loading branch information
sr-gi authored May 26, 2020
1 parent 327f4f4 commit c5617b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions solidity/contracts/BTCUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -480,17 +480,17 @@ library BTCUtils {
return _offset == _vin.length;
}

/// @notice Checks that the vin passed up is properly formatted
/// @dev Consider a vin with a valid vout in its scriptsig
/// @notice Checks that the vout passed up is properly formatted
/// @dev Consider a vout with a valid scriptpubkey
/// @param _vout Raw bytes length-prefixed output vector
/// @return True if it represents a validly formatted bout
/// @return True if it represents a validly formatted vout
function validateVout(bytes memory _vout) internal pure returns (bool) {
uint256 _varIntDataLen;
uint256 _nOuts;

(_varIntDataLen, _nOuts) = parseVarInt(_vout);

// Not valid if it says there are too many or no inputs
// Not valid if it says there are too many or no outputs
if (_nOuts == 0 || _varIntDataLen == ERR_BAD_ARG) {
return false;
}
Expand Down

0 comments on commit c5617b6

Please sign in to comment.