Skip to content

Commit

Permalink
Script: add back two constructors as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan authored and schildbach committed Sep 25, 2024
1 parent caaec74 commit a531898
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/src/main/java/org/bitcoinj/script/Script.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,21 @@ private static void parseIntoChunksPartial(byte[] program, List<ScriptChunk> chu
}
}

/**
* @deprecated Use {@link Script#parse(byte[])}
*/
@Deprecated
public Script(byte[] program) {
this(program, TimeUtils.currentTime());
}

/**
* @deprecated Use {@link Script#parse(byte[], Instant)}
*/
@Deprecated
public Script(byte[] program, long creationTimeInSeconds) {
this(program, Instant.ofEpochSecond(creationTimeInSeconds));
}

// When constructing from a program, we store both program and chunks
private Script(byte[] program, Instant creationTime) {
Expand Down

0 comments on commit a531898

Please sign in to comment.