mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
TransactionOutPoint: fix hashCode to include index.
This commit is contained in:
@@ -16,18 +16,13 @@
|
||||
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.bitcoinj.script.Script;
|
||||
import org.bitcoinj.wallet.KeyBag;
|
||||
import org.bitcoinj.wallet.RedeemData;
|
||||
import org.bitcoinj.script.*;
|
||||
import org.bitcoinj.wallet.*;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Serializable;
|
||||
import javax.annotation.*;
|
||||
import java.io.*;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
/**
|
||||
* This message is a reference or pointer to an output of a different transaction.
|
||||
@@ -245,6 +240,6 @@ public class TransactionOutPoint extends ChildMessage implements Serializable {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getHash().hashCode();
|
||||
return 31 * hash.hashCode() + (int) (index ^ (index >>> 32));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user