-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improve the votes counting algorithm * change the method of voting 1. Add `StateTransaction` 2. Remove `Neo.Account.SetVotes` and `Neo.Validator.Register` * fix tests * consider unconfirmed transactions in `Blockchain.GetValidators` * fix the bug of initializing `DbMetaDataCache` * fix bug of `DbCache.FindInternal` * fix bug of processing `AccountStateDescriptor` * reject the voting to random * allow the voting to standby validators * change version to v2.6.0 * improve the performance of `WalletIndexer`
- Loading branch information
Showing
34 changed files
with
894 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,5 +39,4 @@ Coverage | |
* TransactionResult.cs | ||
* UnspentCoinState.cs | ||
* ValidatorState.cs | ||
* VoteState.cs | ||
* Witness.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using Neo.IO; | ||
using Neo.IO.Caching; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace Neo.UnitTests | ||
{ | ||
public class TestDataCache<TKey, TValue> : DataCache<TKey, TValue> | ||
where TKey : IEquatable<TKey>, ISerializable | ||
where TValue : class, ICloneable<TValue>, ISerializable, new() | ||
{ | ||
public override void DeleteInternal(TKey key) | ||
{ | ||
} | ||
|
||
protected override void AddInternal(TKey key, TValue value) | ||
{ | ||
} | ||
|
||
protected override IEnumerable<KeyValuePair<TKey, TValue>> FindInternal(byte[] key_prefix) | ||
{ | ||
return Enumerable.Empty<KeyValuePair<TKey, TValue>>(); | ||
} | ||
|
||
protected override TValue GetInternal(TKey key) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
protected override TValue TryGetInternal(TKey key) | ||
{ | ||
return null; | ||
} | ||
|
||
protected override void UpdateInternal(TKey key, TValue value) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Neo.IO; | ||
using Neo.IO.Caching; | ||
|
||
namespace Neo.UnitTests | ||
{ | ||
public class TestMetaDataCache<T> : MetaDataCache<T> where T : class, ISerializable, new() | ||
{ | ||
public TestMetaDataCache() | ||
: base(null) | ||
{ | ||
} | ||
|
||
protected override T TryGetInternal() | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.