File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,11 @@ optional type that implements `chain::Filter`:
146
146
``` rust
147
147
impl chain :: Filter for Blockchain {
148
148
fn register_tx (& self , txid : & Txid , script_pubkey : & Script ) {
149
- //
149
+ // <insert code for you to watch for this transaction on-chain>
150
150
}
151
151
152
152
fn register_output (& self , outpoint : & OutPoint , script_pubkey : & Script ) {
153
- //
153
+ // <insert code for you to watch for this output on-chain>
154
154
}
155
155
}
156
156
```
@@ -159,7 +159,17 @@ impl chain::Filter for Blockchain {
159
159
<TabItem value =" java " >
160
160
161
161
``` java
162
- // TODO
162
+ Filter tx_filter = Filter . new_impl(new Filter .FilterInterface () {
163
+ @Override
164
+ public void register_tx (byte [] txid , byte [] script_pubkey ) {
165
+ // <insert code for you to watch for this transaction on-chain>
166
+ }
167
+
168
+ @Override
169
+ void register_output (OutPoint outpoint , byte [] script_pubkey ) {
170
+ // <insert code for you to watch for this output on-chain>
171
+ }
172
+ });
163
173
```
164
174
165
175
</TabItem >
You can’t perform that action at this time.
0 commit comments