mirror of
				https://github.com/bitcoin/bips.git
				synced 2025-11-03 14:19:40 +00:00 
			
		
		
		
	Rename flags in code example to match implementation
This commit is contained in:
		
							parent
							
								
									83fc19d97a
								
							
						
					
					
						commit
						8ad8cad875
					
				@ -62,12 +62,12 @@ This is proposed to be accomplished by replacing IsFinalTx() and CheckFinalTx(),
 | 
				
			|||||||
    /* If this flag set, CTxIn::nSequence is NOT interpreted as a
 | 
					    /* If this flag set, CTxIn::nSequence is NOT interpreted as a
 | 
				
			||||||
     * relative lock-time. Setting the most significant bit of a
 | 
					     * relative lock-time. Setting the most significant bit of a
 | 
				
			||||||
     * sequence number disabled relative lock-time. */
 | 
					     * sequence number disabled relative lock-time. */
 | 
				
			||||||
    static const uint32_t SEQUENCE_LOCKTIME_DISABLED_FLAG = (1 << 31);
 | 
					    static const uint32_t SEQUENCE_LOCKTIME_DISABLE_FLAG = (1 << 31);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    /* If CTxIn::nSequence encodes a relative lock-time and this flag
 | 
					    /* If CTxIn::nSequence encodes a relative lock-time and this flag
 | 
				
			||||||
     * is set, the relative lock-time has units of 512 seconds,
 | 
					     * is set, the relative lock-time has units of 512 seconds,
 | 
				
			||||||
     * otherwise it specifies blocks with a granularity of 1. */
 | 
					     * otherwise it specifies blocks with a granularity of 1. */
 | 
				
			||||||
    static const uint32_t SEQUENCE_LOCKTIME_SECONDS_FLAG = (1 << 22);
 | 
					    static const uint32_t SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    /* If CTxIn::nSequence encodes a relative lock-time, this mask is
 | 
					    /* If CTxIn::nSequence encodes a relative lock-time, this mask is
 | 
				
			||||||
     * applied to extract that lock-time from the sequence field. */
 | 
					     * applied to extract that lock-time from the sequence field. */
 | 
				
			||||||
@ -117,7 +117,7 @@ This is proposed to be accomplished by replacing IsFinalTx() and CheckFinalTx(),
 | 
				
			|||||||
            // Sequence numbers with the most significant bit set are not
 | 
					            // Sequence numbers with the most significant bit set are not
 | 
				
			||||||
            // treated as relative lock-times, nor are they given any
 | 
					            // treated as relative lock-times, nor are they given any
 | 
				
			||||||
            // consensus-enforced meaning at this point.
 | 
					            // consensus-enforced meaning at this point.
 | 
				
			||||||
            if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLED_FLAG)
 | 
					            if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG)
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
            if (prevHeights == NULL)
 | 
					            if (prevHeights == NULL)
 | 
				
			||||||
@ -125,7 +125,7 @@ This is proposed to be accomplished by replacing IsFinalTx() and CheckFinalTx(),
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
            int nCoinHeight = (*prevHeights)[txinIndex];
 | 
					            int nCoinHeight = (*prevHeights)[txinIndex];
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
            if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_SECONDS_FLAG) {
 | 
					            if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) {
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
                int64_t nCoinTime = block.GetAncestor(std::max(nCoinHeight-1, 0))->GetMedianTimePast();
 | 
					                int64_t nCoinTime = block.GetAncestor(std::max(nCoinHeight-1, 0))->GetMedianTimePast();
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user