3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-16 04:05:50 +00:00

wallet.proto: Add IN_CONFLICT transaction confidence state.

This commit is contained in:
Andreas Schildbach 2015-11-29 11:25:32 +01:00
parent 293591bf24
commit 6b95012d1f
2 changed files with 68 additions and 50 deletions

View File

@ -6732,6 +6732,10 @@ public final class Protos {
implements com.google.protobuf.ProtocolMessageEnum { implements com.google.protobuf.ProtocolMessageEnum {
/** /**
* <code>UNKNOWN = 0;</code> * <code>UNKNOWN = 0;</code>
*
* <pre>
* See TransactionConfidence.java for a more thorough explanation of these types.
* </pre>
*/ */
UNKNOWN(0, 0), UNKNOWN(0, 0),
/** /**
@ -6762,7 +6766,7 @@ public final class Protos {
* <code>DEAD = 4;</code> * <code>DEAD = 4;</code>
* *
* <pre> * <pre>
* Either if overriding_transaction is present or transaction is dead coinbase * Either if overriding_transaction is present or transaction is dead coinbase.
* </pre> * </pre>
*/ */
DEAD(4, 4), DEAD(4, 4),
@ -6778,6 +6782,10 @@ public final class Protos {
/** /**
* <code>UNKNOWN = 0;</code> * <code>UNKNOWN = 0;</code>
*
* <pre>
* See TransactionConfidence.java for a more thorough explanation of these types.
* </pre>
*/ */
public static final int UNKNOWN_VALUE = 0; public static final int UNKNOWN_VALUE = 0;
/** /**
@ -6808,10 +6816,18 @@ public final class Protos {
* <code>DEAD = 4;</code> * <code>DEAD = 4;</code>
* *
* <pre> * <pre>
* Either if overriding_transaction is present or transaction is dead coinbase * Either if overriding_transaction is present or transaction is dead coinbase.
* </pre> * </pre>
*/ */
public static final int DEAD_VALUE = 4; public static final int DEAD_VALUE = 4;
/**
* <code>IN_CONFLICT = 5;</code>
*
* <pre>
* There is another transaction spending one of this transaction inputs.
* </pre>
*/
public static final int IN_CONFLICT_VALUE = 5;
public final int getNumber() { return value; } public final int getNumber() { return value; }
@ -18895,59 +18911,59 @@ public final class Protos {
"\030\004 \001(\r\022\r\n\005value\030\005 \001(\003\"\177\n\021TransactionOutp" + "\030\004 \001(\r\022\r\n\005value\030\005 \001(\003\"\177\n\021TransactionOutp" +
"ut\022\r\n\005value\030\001 \002(\003\022\024\n\014script_bytes\030\002 \002(\014\022" + "ut\022\r\n\005value\030\001 \002(\003\022\024\n\014script_bytes\030\002 \002(\014\022" +
"!\n\031spent_by_transaction_hash\030\003 \001(\014\022\"\n\032sp" + "!\n\031spent_by_transaction_hash\030\003 \001(\014\022\"\n\032sp" +
"ent_by_transaction_index\030\004 \001(\005\"\211\003\n\025Trans" + "ent_by_transaction_index\030\004 \001(\005\"\232\003\n\025Trans" +
"actionConfidence\0220\n\004type\030\001 \001(\0162\".wallet." + "actionConfidence\0220\n\004type\030\001 \001(\0162\".wallet." +
"TransactionConfidence.Type\022\032\n\022appeared_a" + "TransactionConfidence.Type\022\032\n\022appeared_a" +
"t_height\030\002 \001(\005\022\036\n\026overriding_transaction", "t_height\030\002 \001(\005\022\036\n\026overriding_transaction",
"\030\003 \001(\014\022\r\n\005depth\030\004 \001(\005\022)\n\014broadcast_by\030\006 " + "\030\003 \001(\014\022\r\n\005depth\030\004 \001(\005\022)\n\014broadcast_by\030\006 " +
"\003(\0132\023.wallet.PeerAddress\0224\n\006source\030\007 \001(\016" + "\003(\0132\023.wallet.PeerAddress\0224\n\006source\030\007 \001(\016" +
"2$.wallet.TransactionConfidence.Source\"O" + "2$.wallet.TransactionConfidence.Source\"`" +
"\n\004Type\022\013\n\007UNKNOWN\020\000\022\014\n\010BUILDING\020\001\022\013\n\007PEN" + "\n\004Type\022\013\n\007UNKNOWN\020\000\022\014\n\010BUILDING\020\001\022\013\n\007PEN" +
"DING\020\002\022\025\n\021NOT_IN_BEST_CHAIN\020\003\022\010\n\004DEAD\020\004\"" + "DING\020\002\022\025\n\021NOT_IN_BEST_CHAIN\020\003\022\010\n\004DEAD\020\004\022" +
"A\n\006Source\022\022\n\016SOURCE_UNKNOWN\020\000\022\022\n\016SOURCE_" + "\017\n\013IN_CONFLICT\020\005\"A\n\006Source\022\022\n\016SOURCE_UNK" +
"NETWORK\020\001\022\017\n\013SOURCE_SELF\020\002\"\303\005\n\013Transacti" + "NOWN\020\000\022\022\n\016SOURCE_NETWORK\020\001\022\017\n\013SOURCE_SEL" +
"on\022\017\n\007version\030\001 \002(\005\022\014\n\004hash\030\002 \002(\014\022&\n\004poo" + "F\020\002\"\303\005\n\013Transaction\022\017\n\007version\030\001 \002(\005\022\014\n\004" +
"l\030\003 \001(\0162\030.wallet.Transaction.Pool\022\021\n\tloc" + "hash\030\002 \002(\014\022&\n\004pool\030\003 \001(\0162\030.wallet.Transa" +
"k_time\030\004 \001(\r\022\022\n\nupdated_at\030\005 \001(\003\0223\n\021tran", "ction.Pool\022\021\n\tlock_time\030\004 \001(\r\022\022\n\nupdated",
"saction_input\030\006 \003(\0132\030.wallet.Transaction" + "_at\030\005 \001(\003\0223\n\021transaction_input\030\006 \003(\0132\030.w" +
"Input\0225\n\022transaction_output\030\007 \003(\0132\031.wall" + "allet.TransactionInput\0225\n\022transaction_ou" +
"et.TransactionOutput\022\022\n\nblock_hash\030\010 \003(\014" + "tput\030\007 \003(\0132\031.wallet.TransactionOutput\022\022\n" +
"\022 \n\030block_relativity_offsets\030\013 \003(\005\0221\n\nco" + "\nblock_hash\030\010 \003(\014\022 \n\030block_relativity_of" +
"nfidence\030\t \001(\0132\035.wallet.TransactionConfi" + "fsets\030\013 \003(\005\0221\n\nconfidence\030\t \001(\0132\035.wallet" +
"dence\0225\n\007purpose\030\n \001(\0162\033.wallet.Transact" + ".TransactionConfidence\0225\n\007purpose\030\n \001(\0162" +
"ion.Purpose:\007UNKNOWN\022+\n\rexchange_rate\030\014 " + "\033.wallet.Transaction.Purpose:\007UNKNOWN\022+\n" +
"\001(\0132\024.wallet.ExchangeRate\022\014\n\004memo\030\r \001(\t\"" + "\rexchange_rate\030\014 \001(\0132\024.wallet.ExchangeRa" +
"Y\n\004Pool\022\013\n\007UNSPENT\020\004\022\t\n\005SPENT\020\005\022\014\n\010INACT" + "te\022\014\n\004memo\030\r \001(\t\"Y\n\004Pool\022\013\n\007UNSPENT\020\004\022\t\n" +
"IVE\020\002\022\010\n\004DEAD\020\n\022\013\n\007PENDING\020\020\022\024\n\020PENDING_", "\005SPENT\020\005\022\014\n\010INACTIVE\020\002\022\010\n\004DEAD\020\n\022\013\n\007PEND",
"INACTIVE\020\022\"\243\001\n\007Purpose\022\013\n\007UNKNOWN\020\000\022\020\n\014U" + "ING\020\020\022\024\n\020PENDING_INACTIVE\020\022\"\243\001\n\007Purpose\022" +
"SER_PAYMENT\020\001\022\020\n\014KEY_ROTATION\020\002\022\034\n\030ASSUR" + "\013\n\007UNKNOWN\020\000\022\020\n\014USER_PAYMENT\020\001\022\020\n\014KEY_RO" +
"ANCE_CONTRACT_CLAIM\020\003\022\035\n\031ASSURANCE_CONTR" + "TATION\020\002\022\034\n\030ASSURANCE_CONTRACT_CLAIM\020\003\022\035" +
"ACT_PLEDGE\020\004\022\033\n\027ASSURANCE_CONTRACT_STUB\020" + "\n\031ASSURANCE_CONTRACT_PLEDGE\020\004\022\033\n\027ASSURAN" +
"\005\022\r\n\tRAISE_FEE\020\006\"N\n\020ScryptParameters\022\014\n\004" + "CE_CONTRACT_STUB\020\005\022\r\n\tRAISE_FEE\020\006\"N\n\020Scr" +
"salt\030\001 \002(\014\022\020\n\001n\030\002 \001(\003:\00516384\022\014\n\001r\030\003 \001(\005:" + "yptParameters\022\014\n\004salt\030\001 \002(\014\022\020\n\001n\030\002 \001(\003:\005" +
"\0018\022\014\n\001p\030\004 \001(\005:\0011\"8\n\tExtension\022\n\n\002id\030\001 \002(" + "16384\022\014\n\001r\030\003 \001(\005:\0018\022\014\n\001p\030\004 \001(\005:\0011\"8\n\tExt" +
"\t\022\014\n\004data\030\002 \002(\014\022\021\n\tmandatory\030\003 \002(\010\" \n\003Ta" + "ension\022\n\n\002id\030\001 \002(\t\022\014\n\004data\030\002 \002(\014\022\021\n\tmand" +
"g\022\013\n\003tag\030\001 \002(\t\022\014\n\004data\030\002 \002(\014\"5\n\021Transact" + "atory\030\003 \002(\010\" \n\003Tag\022\013\n\003tag\030\001 \002(\t\022\014\n\004data\030" +
"ionSigner\022\022\n\nclass_name\030\001 \002(\t\022\014\n\004data\030\002 ", "\002 \002(\014\"5\n\021TransactionSigner\022\022\n\nclass_name",
"\001(\014\"\351\004\n\006Wallet\022\032\n\022network_identifier\030\001 \002" + "\030\001 \002(\t\022\014\n\004data\030\002 \001(\014\"\351\004\n\006Wallet\022\032\n\022netwo" +
"(\t\022\034\n\024last_seen_block_hash\030\002 \001(\014\022\036\n\026last" + "rk_identifier\030\001 \002(\t\022\034\n\024last_seen_block_h" +
"_seen_block_height\030\014 \001(\r\022!\n\031last_seen_bl" + "ash\030\002 \001(\014\022\036\n\026last_seen_block_height\030\014 \001(" +
"ock_time_secs\030\016 \001(\003\022\030\n\003key\030\003 \003(\0132\013.walle" + "\r\022!\n\031last_seen_block_time_secs\030\016 \001(\003\022\030\n\003" +
"t.Key\022(\n\013transaction\030\004 \003(\0132\023.wallet.Tran" + "key\030\003 \003(\0132\013.wallet.Key\022(\n\013transaction\030\004 " +
"saction\022&\n\016watched_script\030\017 \003(\0132\016.wallet" + "\003(\0132\023.wallet.Transaction\022&\n\016watched_scri" +
".Script\022C\n\017encryption_type\030\005 \001(\0162\035.walle" + "pt\030\017 \003(\0132\016.wallet.Script\022C\n\017encryption_t" +
"t.Wallet.EncryptionType:\013UNENCRYPTED\0227\n\025" + "ype\030\005 \001(\0162\035.wallet.Wallet.EncryptionType" +
"encryption_parameters\030\006 \001(\0132\030.wallet.Scr" + ":\013UNENCRYPTED\0227\n\025encryption_parameters\030\006" +
"yptParameters\022\022\n\007version\030\007 \001(\005:\0011\022$\n\text", " \001(\0132\030.wallet.ScryptParameters\022\022\n\007versio",
"ension\030\n \003(\0132\021.wallet.Extension\022\023\n\013descr" + "n\030\007 \001(\005:\0011\022$\n\textension\030\n \003(\0132\021.wallet.E" +
"iption\030\013 \001(\t\022\031\n\021key_rotation_time\030\r \001(\004\022" + "xtension\022\023\n\013description\030\013 \001(\t\022\031\n\021key_rot" +
"\031\n\004tags\030\020 \003(\0132\013.wallet.Tag\0226\n\023transactio" + "ation_time\030\r \001(\004\022\031\n\004tags\030\020 \003(\0132\013.wallet." +
"n_signers\030\021 \003(\0132\031.wallet.TransactionSign" + "Tag\0226\n\023transaction_signers\030\021 \003(\0132\031.walle" +
"er\";\n\016EncryptionType\022\017\n\013UNENCRYPTED\020\001\022\030\n" + "t.TransactionSigner\";\n\016EncryptionType\022\017\n" +
"\024ENCRYPTED_SCRYPT_AES\020\002\"R\n\014ExchangeRate\022" + "\013UNENCRYPTED\020\001\022\030\n\024ENCRYPTED_SCRYPT_AES\020\002" +
"\022\n\ncoin_value\030\001 \002(\003\022\022\n\nfiat_value\030\002 \002(\003\022" + "\"R\n\014ExchangeRate\022\022\n\ncoin_value\030\001 \002(\003\022\022\n\n" +
"\032\n\022fiat_currency_code\030\003 \002(\tB\035\n\023org.bitco" + "fiat_value\030\002 \002(\003\022\032\n\022fiat_currency_code\030\003" +
"inj.walletB\006Protos" " \002(\tB\035\n\023org.bitcoinj.walletB\006Protos"
}; };
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {

View File

@ -172,11 +172,13 @@ message TransactionOutput {
*/ */
message TransactionConfidence { message TransactionConfidence {
enum Type { enum Type {
// See TransactionConfidence.java for a more thorough explanation of these types.
UNKNOWN = 0; UNKNOWN = 0;
BUILDING = 1; // In best chain. If and only if appeared_at_height is present. BUILDING = 1; // In best chain. If and only if appeared_at_height is present.
PENDING = 2; // Unconfirmed and sitting in the networks memory pools, waiting to be included in the chain. PENDING = 2; // Unconfirmed and sitting in the networks memory pools, waiting to be included in the chain.
NOT_IN_BEST_CHAIN = 3; // Deprecated: equivalent to PENDING. NOT_IN_BEST_CHAIN = 3; // Deprecated: equivalent to PENDING.
DEAD = 4; // Either if overriding_transaction is present or transaction is dead coinbase DEAD = 4; // Either if overriding_transaction is present or transaction is dead coinbase.
IN_CONFLICT = 5; // There is another transaction spending one of this transaction inputs.
} }
// This is optional in case we add confidence types to prevent parse errors - backwards compatible. // This is optional in case we add confidence types to prevent parse errors - backwards compatible.