Repository navigation
Expand file tree
/
Copy pathDeposit.java
More file actions
81 lines (44 loc) · 1.86 KB
/
Copy pathDeposit.java
File metadata and controls
81 lines (44 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package org.tron.common.storage;
import org.tron.common.runtime.vm.DataWord;
import org.tron.common.runtime.vm.program.Storage;
import org.tron.core.capsule.AccountCapsule;
import org.tron.core.capsule.BlockCapsule;
import org.tron.core.capsule.ContractCapsule;
import org.tron.core.capsule.TransactionCapsule;
import org.tron.core.db.Manager;
import org.tron.protos.Protocol;
public interface Deposit {
Manager getDbManager();
AccountCapsule createAccount(byte[] address, Protocol.AccountType type);
AccountCapsule createAccount(byte[] address, String accountName, Protocol.AccountType type);
AccountCapsule getAccount(byte[] address);
void deleteContract(byte[] address);
void createContract(byte[] address, ContractCapsule contractCapsule);
ContractCapsule getContract(byte[] address);
void saveCode(byte[] codeHash, byte[] code);
byte[] getCode(byte[] codeHash);
//byte[] getCodeHash(byte[] address);
void putStorageValue(byte[] address, DataWord key, DataWord value);
DataWord getStorageValue(byte[] address, DataWord key);
Storage getStorage(byte[] address);
long getBalance(byte[] address);
long addBalance(byte[] address, long value);
Deposit newDepositChild();
void setParent(Deposit deposit);
void flush();
void commit();
void putAccount(Key key, Value value);
void putTransaction(Key key, Value value);
void putBlock(Key key, Value value);
void putWitness(Key key, Value value);
void putCode(Key key, Value value);
void putContract(Key key, Value value);
void putStorage(Key key, Storage cache);
void putVotes(Key key, Value value);
void syncCacheFromAccountStore(byte[] address);
void syncCacheFromVotesStore(byte[] address);
TransactionCapsule getTransaction(byte[] trxHash);
BlockCapsule getBlock(byte[] blockHash);
long computeAfterRunStorageSize();
long getBeforeRunStorageSize();
}